* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1d3f 25%, #0f1b3d 50%, #1e0a2e 75%, #0a0e27 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50px, -200px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(150px, -150px) scale(1.1);
        opacity: 0.5;
    }
}

/* Grid overlay */
.grid-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Molecules */
.molecule {
    position: fixed;
    width: 300px;
    height: 300px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.molecule-1 {
    top: 20%;
    left: 10%;
    animation: rotate 30s linear infinite;
}

.molecule-2 {
    bottom: 15%;
    right: 10%;
    animation: rotate 40s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Auth Wrapper */
.auth-wrapper {
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #00ffff 0%, #00ccff 50%, #0099ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 0 0 80px rgba(0, 255, 255, 0.5);
}

.logo-subtitle {
    font-size: 14px;
    color: rgba(0, 255, 255, 0.8);
    letter-spacing: 1px;
}

/* Auth Container */
.auth-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 40px 35px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 255, 255, 0.1);
}

/* Toggle Container */
.toggle-container {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: 50px;
    margin-bottom: 35px;
}

.toggle-btn {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    color: rgba(0, 255, 255, 0.7);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #00ffff, #00ccff);
    color: #0a0e27;
    box-shadow: 0 5px 25px rgba(0, 255, 255, 0.4);
}

.toggle-btn:hover:not(.active) {
    color: rgba(0, 255, 255, 1);
}

/* Auth Forms */
.auth-form {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Group */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: rgba(0, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-left: 5px;
    letter-spacing: 0.5px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(0, 255, 255, 0.7);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-wrapper input:focus {
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: rgba(0, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: rgba(0, 255, 255, 1);
}

.eye-icon {
    width: 22px;
    height: 22px;
}

/* Error Messages */
.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    margin-left: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 18px;
}

.error-message:not(:empty) {
    opacity: 1;
    animation: shake 0.3s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.general-error {
    text-align: center;
    margin-bottom: 15px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px 30px;
    margin-top: 10px;
    background: linear-gradient(135deg, #00ffff, #00ccff);
    color: #0a0e27;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 255, 255, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: translateY(0);
}

.btn-text,
.btn-loader {
    position: relative;
    z-index: 1;
}

.btn-loader {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(10, 14, 39, 0.3);
    border-top-color: #0a0e27;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Back to Home */
.back-home {
    margin-top: 25px;
    text-align: center;
}

.back-home a {
    color: rgba(0, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.back-home a:hover {
    color: rgba(0, 255, 255, 1);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* Special Message Overlay */
.special-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.special-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.special-message-container {
    background: linear-gradient(135deg, #00ffff, #00ccff);
    padding: 50px 60px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 80px rgba(0, 255, 255, 0.6);
    transform: scale(0.9);
    transition: transform 0.4s ease;
    max-width: 500px;
    margin: 0 20px;
}

.special-overlay.active .special-message-container {
    transform: scale(1);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sparkle-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

.special-message-container h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0a0e27;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.special-message-container p {
    font-size: 16px;
    color: rgba(10, 14, 39, 0.8);
    font-weight: 600;
    margin-bottom: 25px;
}

/* Continue Button */
.continue-btn {
    padding: 16px 50px;
    background: #0a0e27;
    color: #00ffff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #0a0e27;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(10, 14, 39, 0.4);
    position: relative;
    overflow: hidden;
}

.continue-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.continue-btn:hover::before {
    width: 300px;
    height: 300px;
}

.continue-btn span {
    position: relative;
    z-index: 1;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(10, 14, 39, 0.6);
    border-color: #00ffff;
}

.continue-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 25px;
    }

    .logo-title {
        font-size: 36px;
    }

    .toggle-btn {
        font-size: 14px;
        padding: 12px 15px;
    }

    .special-message-container {
        padding: 40px 30px;
    }

    .special-message-container h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .auth-container {
        padding: 25px 20px;
        border-radius: 25px;
    }

    .logo-title {
        font-size: 32px;
    }

    .form-group {
        margin-bottom: 20px;
    }
}