:root {
    /* Light theme colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #fff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #555;
    --text-muted: #666;
    --border-color: #ddd;
    --border-light: #eee;
    --shadow: rgba(0,0,0,0.1);
    --shadow-strong: rgba(0,0,0,0.2);
    --accent: #007bff;
    --accent-hover: #0056b3;
    --success: #28a745;
    --success-hover: #218838;
    --danger: #dc3545;
    --secondary: #6c757d;
    --secondary-hover: #545b62;
    --overlay: rgba(0,0,0,0.95);
    --overlay-light: rgba(255,255,255,0.1);
    --overlay-light-hover: rgba(255,255,255,0.2);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888;
    --border-color: #444;
    --border-light: #555;
    --shadow: rgba(0,0,0,0.3);
    --shadow-strong: rgba(0,0,0,0.5);
    --accent: #4a9eff;
    --accent-hover: #357abd;
    --success: #40c057;
    --success-hover: #37b24d;
    --danger: #fa5252;
    --secondary: #868e96;
    --secondary-hover: #adb5bd;
    --overlay: rgba(0,0,0,0.95);
    --overlay-light: rgba(255,255,255,0.1);
    --overlay-light-hover: rgba(255,255,255,0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: var(--bg-secondary);
    box-shadow: 0 2px 4px var(--shadow);
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
    z-index: 1001;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-copy {
    background: var(--success);
    color: white;
}

.btn-copy:hover {
    background: var(--success-hover);
}

.auth-box {
    max-width: 400px;
    margin: 100px auto;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow);
    position: relative;
    z-index: 10;
}

.auth-box h1 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.error-message {
    color: var(--danger);
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

/* Taco Quote Footer */
.taco-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    text-align: center;
    z-index: 10;
}

.taco-quote {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

/* Adjust main content to account for footer */
body.has-footer {
    padding-bottom: 70px;
}

body.has-footer .container {
    min-height: calc(100vh - 140px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 15px;
    }
    
    /* Navbar mobile styles */
    .navbar {
        padding: 10px 0;
    }
    
    .nav-container {
        padding: 0 15px;
        position: relative;
    }
    
    .nav-container h1 {
        font-size: 1.2rem;
    }
    
    .nav-container h1 img {
        height: 40px !important;
    }
    
    /* Mobile menu toggle visible on mobile */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Nav links mobile dropdown */
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 5px;
        box-shadow: 0 4px 6px var(--shadow);
        flex-direction: column;
        padding: 10px;
        min-width: 200px;
        margin-top: 10px;
        display: none;
        z-index: 1002;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links .btn {
        width: 100%;
        text-align: left;
        margin: 5px 0;
    }
    
    /* Username in mobile menu */
    .nav-links #username {
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 10px;
    }
    
    /* Auth box mobile */
    .auth-box {
        margin: 50px auto;
        padding: 30px 20px;
        width: calc(100% - 30px);
        max-width: none;
    }
    
    /* Form adjustments */
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer mobile */
    .taco-footer {
        padding: 10px 15px;
    }
    
    .taco-quote {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* Even smaller screens */
    .nav-container h1 span {
        display: none; /* Hide "ImageTaco" text, keep logo only */
    }
    
    .nav-container h1 img {
        height: 35px !important;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .auth-box h1 {
        font-size: 1.5rem;
    }
}

.invite-notice {
    background: var(--success);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    opacity: 0.9;
}

/* PSYCHEDELIC ANIMATED BACKGROUND FOR LOGIN PAGE */
body.login-page {
    position: relative;
    overflow: hidden;
}

body.login-page::before,
body.login-page::after,
.psychedelic-layer-1,
.psychedelic-layer-2,
.psychedelic-layer-3,
.psychedelic-layer-4,
.psychedelic-layer-5 {
    content: '';
    position: fixed;
    top: -200%;
    left: -200%;
    width: 400%;
    height: 400%;
    z-index: 1;
    pointer-events: none;
}

body.login-page::before {
    background: conic-gradient(from 0deg at 50% 50%, 
        #ff0080, #00ff88, #ffff00, #ff00ff, #00ffff, #ff0080);
    animation: spinMadness 0.5s linear infinite, 
               pulsateSize 0.3s ease-in-out infinite alternate,
               hueRotate 0.2s linear infinite;
}

body.login-page::after {
    background: repeating-radial-gradient(circle at 30% 70%, 
        transparent, transparent 10px,
        rgba(255, 0, 255, 0.8) 10px, rgba(255, 0, 255, 0.8) 20px,
        transparent 20px, transparent 30px,
        rgba(0, 255, 255, 0.8) 30px, rgba(0, 255, 255, 0.8) 40px);
    animation: spinReverse 0.3s linear infinite,
               waveDistort 0.15s ease-in-out infinite alternate,
               flashOpacity 0.1s steps(2) infinite;
    mix-blend-mode: screen;
}

.psychedelic-layer-1 {
    background: linear-gradient(45deg, 
        #ff006e, #fb5607, #ffbe0b, #8338ec, #3a86ff,
        #ff006e, #fb5607, #ffbe0b, #8338ec, #3a86ff);
    background-size: 1000% 1000%;
    animation: gradientShift 0.5s ease infinite,
               kaleidoscope 0.4s linear infinite,
               glitchEffect 0.2s steps(10) infinite;
    mix-blend-mode: multiply;
    opacity: 0.7;
}

.psychedelic-layer-2 {
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, 
            rgba(255, 0, 0, 0.5) 35px, rgba(255, 0, 0, 0.5) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, 
            rgba(0, 255, 0, 0.5) 35px, rgba(0, 255, 0, 0.5) 70px),
        repeating-linear-gradient(90deg, transparent, transparent 35px, 
            rgba(0, 0, 255, 0.5) 35px, rgba(0, 0, 255, 0.5) 70px);
    animation: slidePattern 0.2s linear infinite,
               zoomInOut 0.3s ease-in-out infinite alternate,
               rgbSplit 0.1s steps(3) infinite;
    mix-blend-mode: difference;
}

.psychedelic-layer-3 {
    background: radial-gradient(circle at 20% 50%, 
        rgba(255, 0, 255, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, 
        rgba(0, 255, 255, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, 
        rgba(255, 255, 0, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, 
        rgba(0, 255, 0, 0.8) 0%, transparent 50%);
    animation: morphCircles 0.3s ease-in-out infinite,
               rotateHue 0.1s steps(36) infinite,
               pulseBrightness 0.15s ease-in-out infinite alternate;
    mix-blend-mode: color-dodge;
}

.psychedelic-layer-4 {
    background-image: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            #ff0080 0deg, #00ff88 60deg, #ffff00 120deg, 
            #ff00ff 180deg, #00ffff 240deg, #ff0080 360deg);
    animation: spinFast 0.1s linear infinite,
               wobble 0.2s ease-in-out infinite alternate,
               invertColors 0.3s steps(2) infinite;
    mix-blend-mode: exclusion;
    opacity: 0.6;
}

.psychedelic-layer-5 {
    background: 
        repeating-linear-gradient(0deg, 
            transparent, transparent 2px, 
            rgba(255, 255, 255, 0.8) 2px, rgba(255, 255, 255, 0.8) 4px),
        repeating-linear-gradient(90deg, 
            transparent, transparent 2px, 
            rgba(0, 0, 0, 0.8) 2px, rgba(0, 0, 0, 0.8) 4px);
    animation: scanlines 0.05s linear infinite,
               tvStatic 0.1s steps(10) infinite,
               chromaShift 0.2s ease-in-out infinite alternate;
    mix-blend-mode: overlay;
}

/* INSANE ANIMATIONS */
@keyframes spinMadness {
    from { transform: rotate(0deg) scale(2); }
    to { transform: rotate(360deg) scale(2); }
}

@keyframes spinReverse {
    from { transform: rotate(360deg) scale(1.5) skew(10deg); }
    to { transform: rotate(0deg) scale(1.5) skew(-10deg); }
}

@keyframes spinFast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulsateSize {
    0% { transform: scale(2) rotate(0deg); }
    100% { transform: scale(2.5) rotate(180deg); }
}

@keyframes hueRotate {
    from { filter: hue-rotate(0deg) saturate(200%) brightness(150%); }
    to { filter: hue-rotate(360deg) saturate(300%) brightness(200%); }
}

@keyframes waveDistort {
    0% { transform: translateX(-50%) translateY(-50%) scale(1.5) skewX(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) scale(1.8) skewX(20deg); }
}

@keyframes flashOpacity {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes kaleidoscope {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.5); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.5); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes glitchEffect {
    0%, 90% { transform: translate(0); }
    10% { transform: translate(-5px, 5px); }
    20% { transform: translate(5px, -5px); }
    30% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -3px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes slidePattern {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(70px) translateY(70px); }
}

@keyframes zoomInOut {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.5) rotate(45deg); }
}

@keyframes rgbSplit {
    0%, 100% { filter: none; }
    33% { filter: drop-shadow(2px 0 0 red) drop-shadow(-2px 0 0 cyan); }
    66% { filter: drop-shadow(0 2px 0 yellow) drop-shadow(0 -2px 0 magenta); }
}

@keyframes morphCircles {
    0% { transform: scale(1) translateX(0) translateY(0); }
    33% { transform: scale(1.5) translateX(100px) translateY(-100px); }
    66% { transform: scale(0.5) translateX(-100px) translateY(100px); }
    100% { transform: scale(1) translateX(0) translateY(0); }
}

@keyframes rotateHue {
    from { filter: hue-rotate(0deg) contrast(200%); }
    to { filter: hue-rotate(360deg) contrast(300%); }
}

@keyframes pulseBrightness {
    0% { filter: brightness(100%) saturate(100%); }
    100% { filter: brightness(300%) saturate(500%); }
}

@keyframes wobble {
    0% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(5deg) translateX(10px); }
    50% { transform: rotate(-5deg) translateX(-10px); }
    75% { transform: rotate(3deg) translateX(5px); }
    100% { transform: rotate(0deg) translateX(0); }
}

@keyframes invertColors {
    0%, 49% { filter: invert(0); }
    50%, 100% { filter: invert(1); }
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 10px; }
}

@keyframes tvStatic {
    0% { opacity: 0.6; }
    10% { opacity: 0.8; }
    20% { opacity: 0.4; }
    30% { opacity: 0.9; }
    40% { opacity: 0.5; }
    50% { opacity: 0.7; }
    60% { opacity: 0.3; }
    70% { opacity: 0.8; }
    80% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { opacity: 0.6; }
}

@keyframes chromaShift {
    0% { 
        transform: translateX(0);
        filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.8));
    }
    50% { 
        transform: translateX(5px);
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8));
    }
    100% { 
        transform: translateX(0);
        filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.8));
    }
}

/* Additional strobe warning */
.strobe-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 100;
    animation: warningPulse 0.5s ease-in-out infinite;
    transition: none;
}

.strobe-warning.flying {
    animation: flyAroundScreen 2s linear infinite,
               warningPulse 0.5s ease-in-out infinite,
               spinWarning 0.5s linear infinite,
               sizeWobble 0.3s ease-in-out infinite alternate;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes flyAroundScreen {
    0% {
        top: 20px;
        left: 50%;
    }
    12.5% {
        top: 10%;
        left: 90%;
    }
    25% {
        top: 50%;
        left: 95%;
    }
    37.5% {
        top: 90%;
        left: 80%;
    }
    50% {
        top: 85%;
        left: 50%;
    }
    62.5% {
        top: 90%;
        left: 20%;
    }
    75% {
        top: 50%;
        left: 5%;
    }
    87.5% {
        top: 10%;
        left: 10%;
    }
    100% {
        top: 20px;
        left: 50%;
    }
}

@keyframes spinWarning {
    from { transform: translateX(-50%) translateY(-50%) rotate(0deg) scale(1); }
    to { transform: translateX(-50%) translateY(-50%) rotate(360deg) scale(1); }
}

@keyframes sizeWobble {
    0% { transform: translateX(-50%) translateY(-50%) scale(1) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) scale(1.5) rotate(180deg); }
}

/* Flying passwords */
.flying-password {
    position: fixed;
    font-size: 24px;
    font-weight: bold;
    color: #ff00ff;
    text-shadow: 2px 2px 4px rgba(0, 255, 255, 0.8);
    z-index: 5;
    pointer-events: none;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

@keyframes flyPassword1 {
    0% { 
        left: -200px; 
        top: 10%; 
        transform: rotate(0deg) scale(1); 
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        left: 110%; 
        top: 80%; 
        transform: rotate(720deg) scale(2); 
        opacity: 0;
    }
}

@keyframes flyPassword2 {
    0% { 
        right: -200px; 
        top: 90%; 
        transform: rotate(0deg) scale(0.5); 
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        right: 110%; 
        top: 10%; 
        transform: rotate(-540deg) scale(1.5); 
        opacity: 0;
    }
}

@keyframes flyPassword3 {
    0% { 
        left: 50%; 
        top: -100px; 
        transform: translateX(-50%) rotate(0deg); 
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        left: 50%; 
        top: 110%; 
        transform: translateX(-50%) rotate(1080deg) scale(3); 
        opacity: 0;
    }
}

@keyframes flyPassword4 {
    0% { 
        left: -100px; 
        bottom: 50%; 
        transform: rotate(0deg); 
        opacity: 0;
    }
    10% { opacity: 1; }
    50% { 
        left: 50%; 
        bottom: 80%; 
        transform: rotate(360deg) scale(2);
    }
    90% { opacity: 1; }
    100% { 
        left: 110%; 
        bottom: 20%; 
        transform: rotate(720deg) scale(0.5); 
        opacity: 0;
    }
}

@keyframes flyPassword5 {
    0% { 
        right: -150px; 
        top: 50%; 
        transform: rotate(0deg) skew(0deg); 
        opacity: 0;
    }
    10% { opacity: 1; }
    100% { 
        right: 110%; 
        top: 50%; 
        transform: rotate(-900deg) skew(45deg) scale(1.8); 
        opacity: 0;
    }
}

@keyframes flyPasswordZigzag {
    0% { 
        left: -100px; 
        top: 20%; 
        opacity: 0;
    }
    10% { 
        left: 20%; 
        top: 80%; 
        opacity: 1;
    }
    30% { 
        left: 80%; 
        top: 20%;
    }
    50% { 
        left: 30%; 
        top: 60%;
    }
    70% { 
        left: 70%; 
        top: 40%;
    }
    90% { 
        left: 40%; 
        top: 90%; 
        opacity: 1;
    }
    100% { 
        left: 110%; 
        top: 50%; 
        opacity: 0;
    }
}

@keyframes flyPasswordSpiral {
    0% {
        transform: rotate(0deg) translateX(0px) scale(0.1);
        opacity: 0;
    }
    10% { opacity: 1; }
    100% {
        transform: rotate(1440deg) translateX(500px) scale(2);
        opacity: 0;
    }
}

@keyframes flyPasswordBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0;
    }
    10%, 90% { opacity: 1; }
    20% { transform: translateY(-100px) rotate(72deg); }
    30% { transform: translateY(0) rotate(144deg); }
    40% { transform: translateY(-150px) rotate(216deg); }
    50% { transform: translateY(0) rotate(288deg); }
    60% { transform: translateY(-200px) rotate(360deg); }
    70% { transform: translateY(0) rotate(432deg); }
    80% { transform: translateY(-250px) rotate(504deg); }
}

.flying-password:nth-child(1) { animation: flyPassword1 3s linear infinite; }
.flying-password:nth-child(2) { animation: flyPassword2 3.5s linear infinite 0.5s; }
.flying-password:nth-child(3) { animation: flyPassword3 4s linear infinite 1s; }
.flying-password:nth-child(4) { animation: flyPassword4 3.2s linear infinite 1.5s; }
.flying-password:nth-child(5) { animation: flyPassword5 2.8s linear infinite 2s; }
.flying-password:nth-child(6) { animation: flyPasswordZigzag 4.5s linear infinite 0.3s; }
.flying-password:nth-child(7) { animation: flyPasswordSpiral 5s linear infinite 0.7s; }
.flying-password:nth-child(8) { animation: flyPasswordBounce 3.5s ease-in-out infinite 1.2s; }
.flying-password:nth-child(9) { animation: flyPassword1 3.3s linear infinite 1.8s; }
.flying-password:nth-child(10) { animation: flyPassword2 2.9s linear infinite 2.3s; }
.flying-password:nth-child(11) { animation: flyPassword3 3.7s linear infinite 0.2s; }
.flying-password:nth-child(12) { animation: flyPassword4 4.1s linear infinite 0.8s; }
.flying-password:nth-child(13) { animation: flyPassword5 3.4s linear infinite 1.3s; }
.flying-password:nth-child(14) { animation: flyPasswordZigzag 4.8s linear infinite 1.7s; }
.flying-password:nth-child(15) { animation: flyPasswordSpiral 4.3s linear infinite 2.1s; }
.flying-password:nth-child(16) { animation: flyPasswordBounce 3.8s ease-in-out infinite 0.4s; }
.flying-password:nth-child(17) { animation: flyPassword1 2.7s linear infinite 0.9s; }
.flying-password:nth-child(18) { animation: flyPassword2 3.6s linear infinite 1.4s; }
.flying-password:nth-child(19) { animation: flyPassword3 4.2s linear infinite 1.9s; }
.flying-password:nth-child(20) { animation: flyPassword4 3.1s linear infinite 2.4s; }
.flying-password:nth-child(21) { animation: flyPassword5 3.9s linear infinite 0.6s; }
.flying-password:nth-child(22) { animation: flyPasswordZigzag 4.4s linear infinite 1.1s; }
.flying-password:nth-child(23) { animation: flyPasswordSpiral 5.2s linear infinite 1.6s; }
.flying-password:nth-child(24) { animation: flyPasswordBounce 4s ease-in-out infinite 2.2s; }
.flying-password:nth-child(25) { animation: flyPassword1 3.5s linear infinite 0.1s; }

/* Melting effect for auth box */
.auth-box.melting {
    animation: meltDown 2s ease-in forwards,
               dripEffect 0.5s ease-in-out infinite,
               colorMelt 1s ease-in-out infinite;
    transform-origin: center top;
}

.auth-box.melting::before,
.auth-box.melting::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
}

.auth-box.melting::before {
    animation: meltDrip1 2s ease-in infinite;
}

.auth-box.melting::after {
    animation: meltDrip2 2.5s ease-in infinite;
}

@keyframes meltDown {
    0% {
        transform: perspective(1000px) rotateX(0deg) scaleY(1) translateY(0);
        border-radius: 10px;
        opacity: 1;
    }
    20% {
        transform: perspective(1000px) rotateX(5deg) scaleY(1.05) translateY(0);
        border-radius: 10px 10px 20px 20px;
        opacity: 1;
    }
    40% {
        transform: perspective(1000px) rotateX(10deg) scaleY(1.1) translateY(10px);
        border-radius: 10px 10px 40px 40px;
        opacity: 0.9;
    }
    60% {
        transform: perspective(1000px) rotateX(15deg) scaleY(1.2) translateY(30px);
        border-radius: 10px 10px 60px 60px;
        filter: blur(1px);
        opacity: 0.7;
    }
    80% {
        transform: perspective(1000px) rotateX(20deg) scaleY(1.4) translateY(60px) skewX(5deg);
        border-radius: 10px 10px 100px 100px;
        filter: blur(2px);
        opacity: 0.4;
    }
    90% {
        transform: perspective(1000px) rotateX(25deg) scaleY(2) translateY(200px) skewX(10deg);
        border-radius: 10px 10px 200px 200px;
        filter: blur(4px);
        opacity: 0.1;
    }
    100% {
        transform: perspective(1000px) rotateX(30deg) scaleY(3) translateY(400px) skewX(15deg);
        border-radius: 10px 10px 300px 300px;
        filter: blur(8px);
        opacity: 0;
    }
}

@keyframes dripEffect {
    0%, 100% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 90%,
            95% 92%, 90% 94%, 85% 95%, 80% 96%, 75% 97%, 70% 98%, 65% 97%, 60% 96%, 55% 95%, 50% 96%, 45% 97%, 40% 98%, 35% 97%, 30% 95%, 25% 93%, 20% 91%, 15% 92%, 10% 94%, 5% 95%, 0% 90%
        );
    }
    50% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 90%,
            95% 94%, 90% 92%, 85% 96%, 80% 93%, 75% 98%, 70% 95%, 65% 99%, 60% 94%, 55% 97%, 50% 93%, 45% 98%, 40% 95%, 35% 99%, 30% 96%, 25% 91%, 20% 93%, 15% 95%, 10% 92%, 5% 97%, 0% 90%
        );
    }
}

@keyframes meltDrip1 {
    0% {
        transform: translateY(0) scaleY(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(300px) scaleY(2) scaleX(0.5);
        opacity: 0;
        filter: blur(3px);
    }
}

@keyframes meltDrip2 {
    0% {
        transform: translateY(0) translateX(20px) scaleY(1);
        opacity: 0;
    }
    15% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(350px) translateX(-30px) scaleY(2.5) scaleX(0.3);
        opacity: 0;
        filter: blur(4px);
    }
}

@keyframes colorMelt {
    0% {
        background: var(--bg-secondary);
    }
    25% {
        background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(255, 100, 100, 0.3) 100%);
    }
    50% {
        background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(255, 200, 0, 0.3) 100%);
    }
    75% {
        background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(100, 255, 100, 0.3) 100%);
    }
    100% {
        background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(100, 100, 255, 0.3) 100%);
    }
}