/* Modern variables */
:root {
    --primary-color: #4562ff;
    --primary-light: #6b83ff;
    --primary-dark: #3048cc;
    --secondary-color: #0043ce;
    --accent-color: #00c6ff;
    --text-color: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --dark-bg: #0c1b36;
    --card-bg: rgba(13, 27, 55, 0.85);
    --input-bg: rgba(20, 35, 70, 0.7);
    --border-color: rgba(64, 137, 255, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.75);
    --success-color: #4caf50;
    --error-color: #f44336;
    --input-radius: 16px;
    --card-radius: 24px;
    --button-radius: 14px;
    --transition-speed: 0.3s;
    --backdrop-filter: 12px;
    --glow-color: rgba(64, 137, 255, 0.6);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
    color: var(--text-color);
    background-image: url('../patchys/NewPatchNotes/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,40,0.7) 0%, rgba(13,27,55,0.6) 100%);
    z-index: 0;
}

/* Particle effects */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Info Container */
.info-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 27, 55, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 2;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.info-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-content i {
    color: var(--primary-color);
    font-size: 16px;
}

/* Container layouts */
.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.login-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
    z-index: 2;
}

/* Login form container */
.login-form-container {
    background: var(--card-bg);
    backdrop-filter: blur(var(--backdrop-filter));
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: 0 20px 50px var(--shadow-color), 
                0 0 30px rgba(64, 137, 255, 0.15),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
}

/*.login-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px var(--shadow-color),
                0 0 40px rgba(64, 137, 255, 0.25),
                inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.login-form-container::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 1;
}*/

/* Login form header */
.login-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.logo-img {
    width: 130px;
    height: auto;
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(64, 137, 255, 0.8));
    transition: all 0.5s ease;
}

.logo-wrapper:hover .logo-img {
    filter: drop-shadow(0 0 20px rgba(64, 137, 255, 1));
    transform: scale(1.05);
}

.logo-glow {
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-color) 0%, rgba(64, 137, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

.login-title {
    color: var(--text-color);
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #a0c4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(64, 137, 255, 0.3);
    position: relative;
    display: inline-block;
}

.login-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, rgba(64, 137, 255, 0) 0%, rgba(64, 137, 255, 0.8) 50%, rgba(64, 137, 255, 0) 100%);
    bottom: -8px;
    left: 25%;
    border-radius: 3px;
}

/* Login form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.form-group {
    position: relative;
    margin-bottom: 5px;
}

.input-wrapper {
    position: relative;
    transition: all 0.3s ease;
    border-radius: var(--input-radius);
    overflow: hidden;
}

.input-wrapper.focus {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    z-index: -1;
    border-radius: calc(var(--input-radius) + 2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-wrapper.focus::before {
    opacity: 1;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 18px;
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(64, 137, 255, 0.5));
    transition: all 0.3s ease;
}

.input-wrapper.focus .icon-img {
    filter: drop-shadow(0 0 8px rgba(64, 137, 255, 0.8));
    transform: scale(1.15);
}

.input-wrapper input {
    width: 100%;
    padding: 18px 18px 18px 68px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.input-wrapper input:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

/* Form actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.login-btn, .guest-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: var(--button-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(64, 137, 255, 0.4);
    position: relative;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(64, 137, 255, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(64, 137, 255, 0.4);
}

.guest-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.guest-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(64, 137, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.guest-btn:active {
    transform: translateY(0);
}

.login-btn i, .guest-btn i {
    transition: transform 0.3s ease;
}

.login-btn:hover i, .guest-btn:hover i {
    transform: translateX(5px);
}

.btn-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
    transition: transform 0.3s ease;
}

.guest-btn:hover .btn-icon {
    transform: translateX(5px);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
}

/* Impressum styles */
.impressum-container {
    background: transparent;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    margin-top: 2rem;
}

.impressum-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(var(--backdrop-filter));
    text-decoration: none;
    color: var(--text-primary);
}

.impressum-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    background: rgba(20, 35, 70, 0.95);
}

.impressum-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
}

.impressum-header .toggle-icon {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.impressum-header:hover .toggle-icon {
    color: var(--primary-color);
    transform: translateX(2px);
}

.impressum-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-top: 5px;
    max-height: 500px;
    overflow-y: auto;
    transform-origin: top;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(var(--backdrop-filter));
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--card-bg);
    z-index: 101;
    visibility: visible;
    opacity: 1;
}

.impressum-content.collapsed {
    transform: scaleY(0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.impressum-section {
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
    animation-delay: calc(0.1s * var(--section-index, 0));
}

.impressum-section:last-child {
    margin-bottom: 0;
}

.impressum-section h4 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.impressum-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 1px;
}

.impressum-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

/* Custom scrollbar for Webkit browsers */
.impressum-content::-webkit-scrollbar {
    width: 6px;
}

.impressum-content::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

.impressum-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.impressum-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Button animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-form-container, .impressum-container {
        padding: 35px 25px;
    }

    .login-content {
        padding: 20px 15px;
    }

    .logo-img {
        width: 110px;
    }

    .login-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 30px 20px;
    }

    .input-wrapper input {
        padding: 16px 16px 16px 60px;
    }

    .login-btn, .guest-btn {
        padding: 14px 22px;
        font-size: 15px;
    }
    
    .login-title {
        font-size: 24px;
    }
}