/* css/auth.css - 3D Flip Auth Styles */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gradient-bg);
    position: relative;
}

/* Add animated background effect */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: rotateBg 30s linear infinite;
    pointer-events: none;
}

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

.flip-container {
    background-color: transparent;
    width: 100%;
    max-width: 480px;
    height: auto;
    min-height: 600px;
    perspective: 1000px;
}

.flipper {
    position: relative;
    width: 100%;
    min-height: 600px;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-container.flip .flipper {
    transform: rotateY(180deg);
}
.front, .back {
    position: absolute;
    width: 100%;
    min-height: 600px;
    backface-visibility: hidden;
    border-radius: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    background: rgba(18, 20, 26, 0.95);
}

[data-theme="light"] .front,
[data-theme="light"] .back {
    background: rgba(255, 255, 255, 0.95);
}

.front {
    transform: rotateY(0deg);
}

.back {
    transform: rotateY(180deg);
}

.auth-content {
    padding: 2.5rem;
}

/* Back panel specific padding */
.back .auth-content {
    padding: 2rem 2.5rem;
}

.flip-link {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    position: relative;
    transition: all 0.3s ease;
}

.flip-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

.flip-link:hover {
    opacity: 0.9;
}

.referral-info {
    display: none;
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: var(--gradient-success);
    border-radius: 12px;
    color: white;
    animation: slideIn 0.5s ease;
}

.referral-info i {
    color: white;
}

.referral-info span {
    color: white;
    font-weight: 500;
}

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

/* Form group styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.input-icon i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.input-icon input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--bg-primary);
}

.input-icon input::placeholder {
    color: var(--text-muted);
}

/* Divider styles */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--bg-card);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* OAuth buttons */
.oauth-buttons {
    display: flex;
    gap: 1rem;
}
.btn-oauth {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-oauth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-oauth:hover::before {
    left: 0;
}

.btn-oauth:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

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

.btn-oauth:hover i {
    transform: scale(1.1);
}

/* Light theme OAuth button fix */
[data-theme="light"] .btn-oauth {
    color: var(--text-primary);
}

[data-theme="light"] .btn-oauth:hover {
    color: white;
}

/* Auth header styles */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    animation: pulse 2s ease-in-out infinite;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

.auth-header i {
    margin-bottom: 1rem;
}

.auth-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-header p {
    color: var(--text-muted);
}
/* Button primary styles */
.btn-primary {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.btn-primary::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;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white !important;
}

/* Light theme button override */
[data-theme="light"] .btn-primary {
    color: white !important;
}

[data-theme="light"] .btn-primary:hover {
    color: white !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
    
    .auth-content {
        padding: 1.5rem;
    }
    
    .back .auth-content {
        padding: 1.5rem;
    }
    
    .flip-container {
        min-height: 550px;
    }
    
    .flipper,
    .front,
    .back {
        min-height: 550px;
    }
    
    .oauth-buttons {
        flex-direction: column;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.75rem;
        padding-top: 2rem;
    }
    
    .auth-content {
        padding: 1.25rem;
    }
    
    .back .auth-content {
        padding: 1.25rem;
    }
    
    .flip-container {
        min-height: 500px;
    }
    
    .flipper,
    .front,
    .back {
        min-height: 500px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .input-icon input {
        padding: 0.7rem 1rem 0.7rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-oauth {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
}
/* Validation icon styles - BELOW the input */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.validation-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
}

.validation-icon i {
    font-size: 0.7rem;
}

.validation-icon .check-text {
    font-size: 0.7rem;
}

/* Validation message styles */
.validation-message {
    display: block;
    margin-top: 6px;
    margin-left: 4px;
    font-size: 0.7rem;
}

/* Input validation border colors */
.input-icon input.valid {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.input-icon input.invalid {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.input-icon input.pending {
    border-color: var(--warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.02) 100%);
}

/* Validation icon colors */
.validation-icon .valid-icon {
    color: var(--success);
}

.validation-icon .invalid-icon {
    color: var(--danger);
}

.validation-icon .pending-icon {
    color: var(--warning);
}


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