/* Unified Authentication Styles */

/* 确保 Font Awesome 旋转动画工作 */
.fa-spin {
    animation: fa-spin 2s infinite linear !important;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}
.auth-container {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #18181a 0%, #13151a 100%);
}

.auth-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-box h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
}

.auth-subtitle {
    color: #a0aec0;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.0rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 500;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    color: #a0aec0;
    font-size: 0.9rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon-wrapper .toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #a0aec0;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    z-index: 2;
    padding: 0 5px;
    background: transparent;
    border: none;
    outline: none;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.input-icon-wrapper .toggle-password:hover {
    color: #f97316;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.input-icon-wrapper input:hover {
    border-color: #f97316;
}

/* Password Strength Meter */
.password-strength-meter {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-weak {
    background-color: #dc3545;
}

.password-strength-medium {
    background-color: #ffc107;
}

.password-strength-strong {
    background-color: #28a745;
}

.password-strength-text {
    font-size: 0.8rem;
    margin-top: 4px;
    color: #a0aec0;
}

.password-match-message {
    font-size: 0.8rem;
    margin-top: 4px;
    color: #dc3545;
    display: none;
}

.form-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #a0aec0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-primary {
    background: #f97316;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #fb923c, #f97316);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

/* Messages */
.error-message,
.success-message {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease-in-out;
    animation: messageAppear 0.3s ease-in-out;
    font-weight: 500;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.success-message {
    background-color: rgba(40, 167, 69, 0.2);
    color: #51cf66;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

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

/* Floating shapes animation */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
    filter: blur(40px);
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #4f46e5;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: #7c3aed;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #9333ea;
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: #4f46e5;
    top: 30%;
    right: 30%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(5deg);
    }
    50% {
        transform: translate(-10px, 30px) rotate(-5deg);
    }
    75% {
        transform: translate(-30px, -10px) rotate(5deg);
    }
}

/* Social Login Styles */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: #a0aec0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.btn-social {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    min-width: 140px;
    flex: 0 1 auto;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social i {
    font-size: 1.2rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    color: #a0aec0;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #f97316;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a:hover {
    color: #fb923c;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.auth-footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-box {
        padding: 2rem;
    }
    
    .social-login {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .btn-social {
        min-width: 120px;
        padding: 10px 20px;
    }
    
    .shape {
        display: none;
    }
}

/* 验证码输入区样式 */
.input-with-button {
    display: flex;
    gap: 10px;
    width: 100%;
}

.input-with-button .input-icon-wrapper {
    flex: 1;
}

.input-with-button button {
    height: 48px;
    white-space: nowrap;
    padding: 0 15px;
    font-size: 14px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #f97316;
    color: #ffffff;
}

.btn-outline:hover {
    background: rgba(249, 115, 22, 0.1);
}

.btn-outline:disabled {
    background: transparent;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

.code-countdown {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

#countdown-timer {
    color: #f97316;
    font-weight: bold;
}

/* 验证成功样式 */
.verified {
    border-color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.05) !important;
}

.verified + i {
    color: #4CAF50 !important;
} 