/* Auth Pages Styles */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

/* Floating particles animation */
.auth-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent);
    background-size: 200% 200%;
    animation: particleFloat 15s ease-in-out infinite;
    opacity: 0.3;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 90% 60%, 30% 80%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 50% 50%, 20% 80%, 10% 40%, 70% 20%;
    }
}

.auth-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header with Logo */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.auth-logo-section:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-logo-box {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    animation: logoPulse 2s ease-in-out infinite;
    overflow: hidden;
}

.auth-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    }
}

.auth-site-name {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

/* Form Card */
.auth-form-wrapper {
    position: relative;
}

.auth-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: cardSlideIn 0.8s ease 0.2s both;
    position: relative;
    overflow: hidden;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shine effect on card */
.auth-form-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.auth-form-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* Messages */
.auth-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: messageSlide 0.4s ease;
    position: relative;
    z-index: 1;
}

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

.auth-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.auth-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Form Styles */
.auth-form {
    position: relative;
    z-index: 10;
}

.form-input-group {
    margin-bottom: 1.5rem;
    animation: inputFadeIn 0.6s ease both;
}

.form-input-group:nth-child(1) { animation-delay: 0.1s; }
.form-input-group:nth-child(2) { animation-delay: 0.2s; }
.form-input-group:nth-child(3) { animation-delay: 0.3s; }
.form-input-group:nth-child(4) { animation-delay: 0.4s; }
.form-input-group:nth-child(5) { animation-delay: 0.5s; }

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 5;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #6366f1;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px !important;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 5;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #8b5cf6;
    transform: scale(1.1);
}

.form-input:hover {
    border-color: #c7d2fe;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 6px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
}

.eye-icon {
    pointer-events: none;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: buttonPulse 2s ease-in-out infinite;
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
    }
}

.auth-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;
    pointer-events: none;
    z-index: -1;
}

.auth-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auth-submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.auth-submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.auth-submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Footer Links */
.auth-footer-links {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.auth-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: #8b5cf6;
    transform: translateY(-2px);
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link-divider {
    color: #d1d5db;
    margin: 0 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-form-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-site-name {
        font-size: 1.5rem;
    }
    
    .auth-logo-box {
        width: 50px;
        height: 50px;
    }
    
    .auth-form-title {
        font-size: 1.5rem;
    }
    
    /* Fix mobile touch issues */
    .auth-submit-btn {
        min-height: 48px;
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.3);
    }
    
    .auth-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0.5rem;
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }
    
    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .form-input {
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Loading animation */
.auth-submit-btn.loading {
    pointer-events: none;
}

.auth-submit-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

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

