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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
}

/* Background Particles */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    left: 25%;
    animation-delay: -3s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: -6s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    left: 75%;
    animation-delay: -9s;
    animation-duration: 20s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: -12s;
    animation-duration: 16s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Logo Hover Effect */
.logo-hover {
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: logoEntry 1.5s ease-out;
}

.logo-hover:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.3);
}

@keyframes logoEntry {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Input Groups */
.input-group {
    position: relative;
    animation: inputSlideIn 0.8s ease-out both;
}

.input-group:nth-child(1) { animation-delay: 0.2s; }
.input-group:nth-child(2) { animation-delay: 0.3s; }
.input-group:nth-child(3) { animation-delay: 0.4s; }
.input-group:nth-child(4) { animation-delay: 0.5s; }
.input-group:nth-child(5) { animation-delay: 0.6s; }
.input-group:nth-child(6) { animation-delay: 0.7s; }
.input-group:nth-child(7) { animation-delay: 0.8s; }

@keyframes inputSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Input Enhancements */
.form-input {
    position: relative;
    z-index: 2;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.15);
}

.form-input:focus + .input-glow {
    opacity: 1;
    transform: scale(1.02);
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

/* Password Toggle */
.password-toggle {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px;
}

.password-toggle:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: scale(1.1);
}

/* Custom Checkbox */
.custom-checkbox {
    transition: all 0.3s ease;
    cursor: pointer;
}

input:checked ~ .custom-checkbox {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border-color: #fbbf24;
    transform: scale(1.1);
}

input:checked ~ .custom-checkbox i {
    opacity: 1;
    transform: scale(1.2);
}

/* Button Enhancements */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.btn-secondary:hover::before {
    transform: scaleX(1);
}

/* Error Messages */
.error-message.show {
    opacity: 1;
    transform: translateY(0);
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success Animation */
.success-animation {
    animation: successPulse 1s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Card Entry Animation */
.bg-white\/10 {
    animation: cardEntry 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
    position: relative;
}

.bg-white\/10::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: inherit;
    z-index: -1;
}

@keyframes cardEntry {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bg-white\/10 {
        margin: 1rem;
        padding: 2rem;
    }
    
    .form-input {
        padding: 1rem 3rem 1rem 3rem;
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .logo-hover {
        height: 5rem;
        width: 5rem;
    }
}

@media (max-width: 480px) {
    .bg-white\/10 {
        padding: 1.5rem;
    }
    
    .form-input {
        padding: 0.875rem 2.5rem;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States */
.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
