/* static/css/pages/login.css - Login page-specific styling */
/* PUFF N PURL - Cyberpunk Neon Theme */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* Valorax-style font using Orbitron */
@font-face {
    font-family: 'Valorax';
    src: local('Orbitron');
    font-weight: 900;
}

:root {
    --cyber-purple: #b400ff;
    --cyber-pink: #ff00ff;
    --cyber-cyan: #00f3ff;
    --cyber-green: #00ff41;
    --cyber-orange: #ff6600;
    --cyber-yellow: #ffff00;
    --cyber-bg: #0a0e27;
    --cyber-card: #1a1f3a;
    --cyber-text: #e0e0e0;
    --cyber-text-dim: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Pulse animation for sidebar toggle button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 50px red;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 80px red, 0 0 100px yellow;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 50px red;
    }
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(125deg,
        rgba(10, 14, 39, 0.35) 0%,
        rgba(26, 10, 46, 0.32) 25%,
        rgba(22, 33, 62, 0.38) 50%,
        rgba(10, 14, 39, 0.35) 75%),
        url('/static/images/cyber-bg.jpg') center/cover no-repeat fixed;
    background-size: 320% 320%, cover;
    animation: cyberGradient 16s ease-in-out infinite;
    color: var(--cyber-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 16px 56px;
    gap: 12px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
}

.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(10, 14, 39, 0.65) 0%, rgba(26, 10, 46, 0.60) 25%, rgba(22, 33, 62, 0.70) 50%, rgba(10, 14, 39, 0.65) 75%),
                #0a0e27;
    z-index: -2;
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    contain: layout style paint; /* CSS containment for better performance */
}

.cyber-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.intro-title {
    font-family: 'Valorax', 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: visible;
    display: block;
    background: linear-gradient(45deg, #ff00ff, #00f3ff, #00ff41);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 30px rgba(0, 243, 255, 0.3);
}

.intro-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00f3ff;
    text-shadow:
        0 0 15px rgba(0, 243, 255, 0.9),
        0 0 25px rgba(0, 243, 255, 0.7);
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
    text-transform: none;
    margin-top: 8px;
    margin-bottom: 16px;
}

.intro-flag {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffff00;
    margin: 6px 0 16px;
    text-shadow:
        0 0 12px rgba(255, 255, 0, 0.8),
        0 0 20px rgba(255, 255, 0, 0.6),
        0 0 28px rgba(255, 255, 0, 0.4);
    letter-spacing: 0.5px;
    font-family: 'Rajdhani', sans-serif;
}

.intro-description {
    margin: 16px 0 0;
}

.intro-description p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin: 10px 0;
    color: #e0e0e0;
    font-weight: 500;
    font-family: 'Rajdhani', sans-serif;
}

.intro-description p:nth-child(1) {
    color: #ff69b4;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.6);
}

.intro-description p:nth-child(2) {
    color: #00f3ff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.intro-tagline {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff1493;
    margin-top: 20px;
    text-shadow:
        0 0 15px rgba(255, 20, 147, 0.8),
        0 0 25px rgba(255, 20, 147, 0.6);
    letter-spacing: 1.5px;
    font-family: 'Rajdhani', sans-serif;
}

.neon-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cyber-pink), var(--cyber-cyan), var(--cyber-green));
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.4), 0 0 28px rgba(0, 243, 255, 0.35), 0 0 36px rgba(0, 255, 65, 0.3);
    border-radius: 999px;
    margin: 4px 0 20px;
}

.login-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.login-sidebar {
    flex: 1;
    max-width: 350px;
    margin-top: 20px;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.sidebar-content {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.8), rgba(42, 15, 84, 0.6));
    border: 2px solid rgba(255, 105, 180, 0.4);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow:
        0 0 30px rgba(255, 105, 180, 0.3),
        0 0 50px rgba(255, 20, 147, 0.2),
        inset 0 0 30px rgba(255, 105, 180, 0.1);
    position: relative;
    overflow: hidden;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.sidebar-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 105, 180, 0.1), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0, 243, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.sidebar-title {
    font-family: 'Valorax', 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ff69b4;
    text-align: center;
    margin-bottom: 25px;
    text-shadow:
        0 0 15px rgba(255, 105, 180, 0.8),
        0 0 25px rgba(255, 105, 180, 0.6);
    letter-spacing: 1px;
}

.sidebar-features {
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 105, 180, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 105, 180, 0.1);
    border-color: rgba(255, 105, 180, 0.4);
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

.feature-icon {
    font-size: 1.8rem;
    width: 35px;
    text-align: center;
}

.feature-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif;
}

.sidebar-quote {
    text-align: center;
    padding: 20px 15px;
    background: linear-gradient(45deg, rgba(255, 20, 147, 0.1), rgba(0, 243, 255, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(255, 20, 147, 0.3);
}

.sidebar-quote p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff69b4;
    font-style: italic;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.6);
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
}

.auth-container {
    flex: 1;
    max-width: 480px;
    margin-top: 20px;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.auth-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.95) 0%, rgba(46, 21, 68, 0.95) 100%);
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--cyber-pink), var(--cyber-cyan), var(--cyber-purple), var(--cyber-green)) 1;
    border-radius: 16px;
    box-shadow:
        0 0 44px rgba(255, 0, 255, 0.7),
        0 0 82px rgba(0, 243, 255, 0.55),
        0 0 110px rgba(0, 255, 65, 0.38),
        inset 0 0 64px rgba(180, 0, 255, 0.2);
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
    overflow: hidden;
}

.auth-body {
    padding: 32px 30px 28px;
}

.form-title {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.9rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-pink), var(--cyber-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.form-group label {
    color: var(--cyber-cyan);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(26, 10, 46, 0.35) 100%);
    border: 2px solid;
    border-image: linear-gradient(90deg, var(--cyber-purple), var(--cyber-pink)) 1;
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--cyber-text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 18px rgba(180, 0, 255, 0.12);
}

.form-input:focus {
    outline: none;
    border-image: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-green)) 1;
    box-shadow:
        0 0 25px rgba(0, 243, 255, 0.4),
        0 0 40px rgba(0, 255, 65, 0.22),
        inset 0 0 20px rgba(0, 243, 255, 0.12);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 46, 82, 0.35) 100%);
}

.form-input::placeholder {
    color: var(--cyber-text-dim);
}

.btn {
    font-family: 'Orbitron', sans-serif;
    padding: 0.9rem 2.1rem;
    border: 2px solid;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    overflow: hidden;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 320px;
    height: 320px;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1) 0%, rgba(0, 255, 65, 0.12) 100%);
    color: var(--cyber-cyan);
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-green)) 1;
    text-shadow: 0 0 12px rgba(0, 243, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.22) 0%, rgba(0, 255, 65, 0.22) 100%);
    box-shadow:
        0 0 40px rgba(0, 243, 255, 0.62),
        0 0 60px rgba(0, 255, 65, 0.32),
        inset 0 0 22px rgba(0, 243, 255, 0.18);
    transform: translateY(-3px) scale(1.02);
    text-shadow: 0 0 16px rgba(0, 243, 255, 1);
}

.btn-block {
    width: 100%;
}

.link-primary {
    color: var(--cyber-cyan);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.link-primary:hover {
    color: var(--cyber-pink);
    text-shadow: 0 0 14px rgba(255, 0, 255, 0.65);
}

.auth-footer {
    margin-top: 1.6rem;
    text-align: center;
    color: var(--cyber-text-dim);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-layout {
        gap: 30px;
        padding: 0 15px;
    }

    .login-sidebar {
        max-width: 320px;
    }

    .auth-container {
        max-width: 450px;
    }

    .sidebar-title {
        font-size: 1.9rem;
    }

    .feature-item {
        padding: 10px 12px;
        gap: 12px;
    }

    .feature-icon {
        font-size: 1.6rem;
        width: 32px;
    }

    .feature-text {
        font-size: 1rem;
    }

    .intro-title {
        font-size: 3.5rem;
    }

    .intro-subtitle {
        font-size: 1.4rem;
    }

    /* Show toggle button on tablets too */
    .sidebar-toggle {
        display: block;
    }

    /* Make sidebar collapsible on tablets */
    .login-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        z-index: 999;
        transition: right 0.3s ease;
        margin-top: 0;
        max-width: none;
    }

    .login-sidebar.sidebar-open {
        right: 0;
    }

    /* Overlay for tablets too */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Temporarily make sidebar collapsible on desktop too for debugging */
@media (min-width: 1025px) {
    .login-sidebar {
        position: fixed;
        top: 0;
        right: -350px; /* Hide sidebar off-screen */
        width: 350px;
        height: 100vh;
        z-index: 999;
        transition: right 0.3s ease;
        margin-top: 0;
    }

    .login-sidebar.sidebar-open {
        right: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    body {
        padding: 40px 15px 40px; /* Increased top padding from 20px to 40px */
    }

    .sidebar-toggle {
        display: block; /* Show toggle button on mobile */
    }

    .login-sidebar {
        position: fixed;
        top: 0;
        right: -100%; /* Hide sidebar off-screen by default */
        width: 300px;
        height: 100vh;
        z-index: 999;
        transition: right 0.3s ease;
        margin-top: 0;
        order: initial;
        max-width: none;
    }

    .login-sidebar.sidebar-open {
        right: 0; /* Show sidebar when open */
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .login-hero {
        margin-bottom: 15px;
    }

    .intro-content {
        text-align: center;
        max-width: 100%;
    }

    .intro-title {
        font-size: 2.8rem;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .intro-subtitle {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .intro-flag {
        font-size: 1.1rem;
        margin: 4px 0 12px;
    }

    .intro-description p {
        font-size: 1rem;
        line-height: 1.5;
        margin: 8px 0;
    }

    .intro-tagline {
        font-size: 1.3rem;
        margin-top: 15px;
    }

    .neon-line {
        margin: 2px 0 15px;
    }

    .login-layout {
        flex-direction: column;
        gap: 25px;
        align-items: center;
        padding: 0;
        max-width: 100%;
    }

    .login-sidebar {
        max-width: 100%;
        width: 100%;
        margin-top: 0;
        order: 2; /* Sidebar comes after login form on mobile */
    }

    .sidebar-content {
        padding: 25px 20px;
        margin: 0 auto;
        max-width: 400px;
    }

    .sidebar-title {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }

    .feature-item {
        padding: 12px 15px;
        margin-bottom: 12px;
        gap: 15px;
    }

    .feature-icon {
        font-size: 1.6rem;
        width: 32px;
    }

    .feature-text {
        font-size: 1rem;
    }

    .sidebar-quote {
        padding: 18px 12px;
    }

    .sidebar-quote p {
        font-size: 1.1rem;
    }

    .auth-container {
        order: 1; /* Login form comes first on mobile */
        max-width: 100%;
        width: 100%;
        margin-top: 0;
    }

    .auth-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .auth-body {
        padding: 28px 24px 24px;
    }

    .form-title {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
        letter-spacing: 2px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-input {
        padding: 11px 13px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.85rem 2rem;
        font-size: 0.9rem;
    }

    .auth-footer {
        margin-top: 1.4rem;
    }

    .auth-footer p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 35px 12px 35px; /* Increased top padding from 15px to 35px */
    }

    .sidebar-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .sidebar-toggle-icon {
        width: 18px;
        height: 14px;
    }

    .login-sidebar {
        width: 280px; /* Slightly narrower on small screens */
    }

    .login-hero {
        margin-bottom: 10px;
    }

    .intro-title {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
        margin-bottom: 10px;
    }

    .intro-subtitle {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .intro-flag {
        font-size: 1rem;
        margin: 3px 0 10px;
    }

    .intro-description p {
        font-size: 0.95rem;
        line-height: 1.4;
        margin: 6px 0;
    }

    .intro-tagline {
        font-size: 1.1rem;
        margin-top: 12px;
        letter-spacing: 1px;
    }

    .neon-line {
        height: 2px;
        margin: 1px 0 12px;
    }

    .login-layout {
        gap: 20px;
    }

    .sidebar-content {
        padding: 20px 16px;
        max-width: 100%;
        border-radius: 16px;
    }

    .sidebar-title {
        font-size: 1.5rem;
        margin-bottom: 18px;
    }

    .feature-item {
        padding: 10px 12px;
        margin-bottom: 10px;
        gap: 12px;
        border-radius: 10px;
    }

    .feature-icon {
        font-size: 1.5rem;
        width: 28px;
    }

    .feature-text {
        font-size: 0.95rem;
    }

    .sidebar-quote {
        padding: 15px 10px;
        border-radius: 12px;
    }

    .sidebar-quote p {
        font-size: 1rem;
    }

    .auth-card {
        max-width: 100%;
        border-radius: 14px;
    }

    .auth-body {
        padding: 24px 20px 20px;
    }

    .form-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        letter-spacing: 1.5px;
    }

    .form-group {
        gap: 0.5rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .auth-footer {
        margin-top: 1.2rem;
    }

    .auth-footer p {
        font-size: 0.85rem;
    }
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none; /* Hidden by default, shown on mobile/tablet */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.9), rgba(0, 243, 255, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Disable callout on iOS */
    -webkit-user-select: none; /* Disable text selection */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.7), 0 0 40px rgba(0, 243, 255, 0.5);
}

.sidebar-toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-toggle-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cyber-bg::before {
        background-size: 25px 25px; /* Smaller grid on high DPI */
    }
}

/* Extra small screens (360px and below) */
@media (max-width: 360px) {
    body {
        padding: 30px 10px 30px;
    }

    .sidebar-toggle {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .sidebar-toggle-icon {
        width: 16px;
        height: 12px;
    }

    .sidebar-toggle-icon span {
        height: 1.5px;
    }

    .login-sidebar {
        width: 260px; /* Even narrower on very small screens */
    }

    .intro-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .intro-subtitle {
        font-size: 1rem;
    }

    .intro-description p {
        font-size: 0.9rem;
    }

    .sidebar-content {
        padding: 18px 14px;
    }

    .sidebar-title {
        font-size: 1.4rem;
    }

    .auth-body {
        padding: 20px 16px 16px;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-input {
        padding: 9px 11px;
    }

    .btn {
        padding: 0.75rem 1.6rem;
    }
}

/* Cyberpunk gradient animation for background */
@keyframes cyberGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

