/* ======================================
   ARKI-42 LOGIN STYLES
   ======================================
   
   Structure:
   1. Variables & Custom Properties
   2. Basic Reset & Typography
   3. Login Page Layout
   4. Components
   5. Form Elements
   6. Animations & Effects
   7. Dark Mode
   8. Media Queries
   ====================================== */

/* ======================================
   1. Variables & Custom Properties
   ====================================== */
:root {
    /* Color Palette - Light Mode */
    --color-primary: #3644ee;
    --color-primary-dark: #2130d0;
    --color-primary-light: #6670f2;
    --color-secondary: #4f42b5;
    --color-accent: #6e42ce;
    
    --color-bg: #f8fafc;
    --color-bg-secondary: #edf2f7;
    --color-bg-tertiary: #e2e8f0;
    
    --color-text: #1a202c;
    --color-text-light: #4a5568;
    --color-text-lighter: #718096;
    
    --color-border: #e2e8f0;
    --color-shadow: rgba(0, 0, 0, 0.1);
    
    --color-success: #48bb78;
    --color-error: #f56565;
    --color-warning: #ed8936;
    --color-info: #4299e1;
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --space-xxxl: 5rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Box Shadow */
    --shadow-sm: 0 2px 4px var(--color-shadow);
    --shadow-md: 0 4px 6px var(--color-shadow);
    --shadow-lg: 0 10px 15px -3px var(--color-shadow);
    
    /* Transition */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ======================================
   2. Basic Reset & Typography
   ====================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.025em;
}

p {
    margin-bottom: var(--space-md);
}

/* ======================================
   3. Login Page Layout
   ====================================== */
.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, var(--color-bg), var(--color-bg-secondary));
    overflow: hidden;
}

.login-container {
    max-width: 500px;
    width: 90%;
    margin: auto;
    padding: var(--space-xxl);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-footer {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

/* ======================================
   4. Components
   ====================================== */
.glitch-effect {
    position: relative;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--color-text);
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 3px 3px 6px rgba(54, 68, 238, 0.35);
    animation: mainTitleShadow 2.8s infinite;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
}

.description {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 36rem;
    margin: 0 auto var(--space-xl);
}

.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 500;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
    width: 100%;
}

.btn:hover, .btn:focus {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(54, 68, 238, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgba(54, 68, 238, 0.35);
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

/* ======================================
   5. Form Elements
   ====================================== */
.login-form-container {
    margin-top: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(54, 68, 238, 0.15);
}

.error-message {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    height: 1.25rem; /* Fixed height to prevent layout shift */
}

.login-status {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    margin-top: var(--space-lg);
    display: none;
}

.login-status.success {
    display: block;
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.login-status.error {
    display: block;
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

/* ======================================
   6. Animations & Effects
   ====================================== */
/* Animation für den beweglichen flackernden Schatten des Haupttitels */
@keyframes mainTitleShadow {
    0% {
        text-shadow: 3px 3px 6px rgba(54, 68, 238, 0.35);
    }
    10% {
        text-shadow: 4px 2px 7px rgba(110, 66, 206, 0.4);
    }
    20% {
        text-shadow: 2px 4px 8px rgba(54, 68, 238, 0.35);
    }
    30% {
        text-shadow: 5px 2px 7px rgba(110, 66, 206, 0.4);
    }
    40% {
        text-shadow: 1px 5px 6px rgba(54, 68, 238, 0.35);
    }
    50% {
        text-shadow: 5px 1px 7px rgba(110, 66, 206, 0.4);
    }
    60% {
        text-shadow: 4px 4px 8px rgba(54, 68, 238, 0.35);
    }
    70% {
        text-shadow: 2px 3px 7px rgba(110, 66, 206, 0.4);
    }
    80% {
        text-shadow: 3px 2px 8px rgba(54, 68, 238, 0.35);
    }
    90% {
        text-shadow: 4px 5px 7px rgba(110, 66, 206, 0.4);
    }
    100% {
        text-shadow: 3px 3px 6px rgba(54, 68, 238, 0.35);
    }
}

/* ======================================
   7. Dark Mode
   ====================================== */
.dark-mode {
    --color-bg: #1a202c;
    --color-bg-secondary: #2d3748;
    --color-bg-tertiary: #4a5568;
    
    --color-text: #f7fafc;
    --color-text-light: #e2e8f0;
    --color-text-lighter: #cbd5e0;
    
    --color-border: #4a5568;
    --color-shadow: rgba(0, 0, 0, 0.3);
}

.dark-mode .login-container {
    background-color: rgba(26, 32, 44, 0.8);
}

.dark-mode .glitch-effect {
    animation: mainTitleShadowDark 2.8s infinite;
}

@keyframes mainTitleShadowDark {
    0% {
        text-shadow: 3px 3px 6px rgba(102, 126, 234, 0.4);
    }
    10% {
        text-shadow: 4px 2px 7px rgba(129, 140, 248, 0.45);
    }
    20% {
        text-shadow: 2px 4px 8px rgba(102, 126, 234, 0.4);
    }
    30% {
        text-shadow: 5px 2px 7px rgba(129, 140, 248, 0.45);
    }
    40% {
        text-shadow: 1px 5px 6px rgba(102, 126, 234, 0.4);
    }
    50% {
        text-shadow: 5px 1px 7px rgba(129, 140, 248, 0.45);
    }
    60% {
        text-shadow: 4px 4px 8px rgba(102, 126, 234, 0.4);
    }
    70% {
        text-shadow: 2px 3px 7px rgba(129, 140, 248, 0.45);
    }
    80% {
        text-shadow: 3px 2px 8px rgba(102, 126, 234, 0.4);
    }
    90% {
        text-shadow: 4px 5px 7px rgba(129, 140, 248, 0.45);
    }
    100% {
        text-shadow: 3px 3px 6px rgba(102, 126, 234, 0.4);
    }
}

/* ======================================
   8. Media Queries
   ====================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .glitch-effect {
        font-size: 2.5rem;
        animation: mainTitleShadowMobile 2.8s infinite;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .login-container {
        padding: var(--space-xl);
    }
    
    @keyframes mainTitleShadowMobile {
        0% {
            text-shadow: 2px 2px 4px rgba(54, 68, 238, 0.35);
        }
        10% {
            text-shadow: 3px 1px 5px rgba(110, 66, 206, 0.4);
        }
        20% {
            text-shadow: 1px 3px 5px rgba(54, 68, 238, 0.35);
        }
        30% {
            text-shadow: 3px 1px 5px rgba(110, 66, 206, 0.4);
        }
        40% {
            text-shadow: 0px 3px 4px rgba(54, 68, 238, 0.35);
        }
        50% {
            text-shadow: 3px 0px 5px rgba(110, 66, 206, 0.4);
        }
        60% {
            text-shadow: 2px 2px 5px rgba(54, 68, 238, 0.35);
        }
        70% {
            text-shadow: 1px 2px 5px rgba(110, 66, 206, 0.4);
        }
        80% {
            text-shadow: 2px 1px 5px rgba(54, 68, 238, 0.35);
        }
        90% {
            text-shadow: 3px 3px 5px rgba(110, 66, 206, 0.4);
        }
        100% {
            text-shadow: 2px 2px 4px rgba(54, 68, 238, 0.35);
        }
    }
    
    .dark-mode .glitch-effect {
        animation: mainTitleShadowDarkMobile 2.8s infinite;
    }
    
    @keyframes mainTitleShadowDarkMobile {
        0% {
            text-shadow: 2px 2px 4px rgba(102, 126, 234, 0.4);
        }
        10% {
            text-shadow: 3px 1px 5px rgba(129, 140, 248, 0.45);
        }
        20% {
            text-shadow: 1px 3px 5px rgba(102, 126, 234, 0.4);
        }
        30% {
            text-shadow: 3px 1px 5px rgba(129, 140, 248, 0.45);
        }
        40% {
            text-shadow: 0px 3px 4px rgba(102, 126, 234, 0.4);
        }
        50% {
            text-shadow: 3px 0px 5px rgba(129, 140, 248, 0.45);
        }
        60% {
            text-shadow: 2px 2px 5px rgba(102, 126, 234, 0.4);
        }
        70% {
            text-shadow: 1px 2px 5px rgba(129, 140, 248, 0.45);
        }
        80% {
            text-shadow: 2px 1px 5px rgba(102, 126, 234, 0.4);
        }
        90% {
            text-shadow: 3px 3px 5px rgba(129, 140, 248, 0.45);
        }
        100% {
            text-shadow: 2px 2px 4px rgba(102, 126, 234, 0.4);
        }
    }
}