/**
 * AI Photo Trend - Authentication Pages
 * Login & Register page styles
 */

/* ===== AUTHENTICATION PAGES ===== */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.auth-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cosmic-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-red);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    top: 50%;
    right: -100px;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.auth-box {
    background: rgba(20, 20, 31, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tagline {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.875rem 1.25rem;
    background: rgba(42, 42, 63, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(42, 42, 63, 0.8);
    box-shadow: 0 0 20px rgba(179, 0, 255, 0.3);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding-right: 3rem !important;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    pointer-events: none;
}

/* Remember Me Checkbox */
.form-group-checkbox {
    margin: 0.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.checkbox-container:hover {
    color: var(--text-primary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background: rgba(42, 42, 63, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkbox-checkmark {
    border-color: var(--accent-purple);
    background: rgba(42, 42, 63, 0.8);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(179, 0, 255, 0.4);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.checkbox-container .checkbox-checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    margin-left: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

/* ===== SIGN IN WITH APPLE ===== */
.social-login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.social-login-divider span {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-apple {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-apple:hover {
    background: #1a1a1a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-apple svg {
    flex-shrink: 0;
}

/* ===== ACCOUNT BENEFITS BOX ===== */
.account-benefits-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.benefits-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benefits-list li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== INFO BOX ===== */
.info-box {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 200, 100, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.info-box p {
    color: var(--text-primary);
    margin: 0;
    font-size: 0.9rem;
}

/* ===== SPINNER FOR LOADING STATES ===== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.btn-apple:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-apple .spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
}

/* ===== SKIP / TRY WITHOUT ACCOUNT SECTION ===== */
.skip-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-skip {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 255, 0.15)) !important;
    color: #00ff88 !important;
    border: 2px solid rgba(0, 255, 136, 0.4) !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(0, 200, 255, 0.25)) !important;
    border-color: #00ff88 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

.btn-skip svg {
    flex-shrink: 0;
}

.skip-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy Guest Section (for backwards compatibility) */
.guest-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-guest {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 2px dashed var(--border-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-guest:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--accent-purple) !important;
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.btn-guest svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.btn-guest:hover svg {
    opacity: 1;
}

.guest-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
}

.guest-info small {
    color: #ffc107;
    font-size: 0.75rem;
    line-height: 1.4;
    display: block;
}

/* Guest Banner for Dashboard */
.guest-banner {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.15));
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.guest-banner-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffc107;
}

.guest-banner-text svg {
    flex-shrink: 0;
}

.guest-banner-text p {
    margin: 0;
    font-size: 0.9rem;
}

.guest-banner-action {
    display: flex;
    gap: 0.75rem;
}

.guest-banner-action .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}