/**
 * Authentication System Styles
 */

/* Auth Modal */
.auth-modal,
.upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-overlay,
.upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.auth-content,
.upgrade-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.upgrade-content {
    max-width: 700px;
}

.auth-close,
.upgrade-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.auth-close:hover,
.upgrade-close:hover {
    background: var(--bg-hover);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--maya-gold);
    border-bottom-color: var(--maya-gold);
}

.auth-tab:hover {
    color: var(--text-primary);
}

/* Auth Form */
.auth-form h2 {
    font-family: 'Cinzel', serif;
    color: var(--maya-gold);
    margin: 0 0 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--maya-gold);
}

.admin-hint {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(201, 169, 97, 0.1);
    border-radius: 6px;
    text-align: center;
}

.admin-hint small {
    color: var(--maya-gold);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.auth-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: center;
}

/* Social Login */
.social-login {
    margin-bottom: 1.5rem;
}

.google-btn-container {
    display: flex;
    justify-content: center;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.divider span {
    padding: 0 1rem;
}

/* User Menu */
.user-menu {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--maya-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #000;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tier-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.free {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.tier-badge.premium {
    background: var(--maya-gold);
    color: #000;
}

.tier-badge.admin {
    background: #9b59b6;
    color: #fff;
}

.admin-badge {
    font-size: 0.7rem;
    background: #9b59b6;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    text-align: center;
}

.pricing-card.premium {
    border-color: var(--maya-gold);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--maya-gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 10px;
}

.pricing-card h3 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--maya-gold);
    margin-bottom: 1rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pricing-card li.disabled {
    opacity: 0.4;
    text-decoration: line-through;
}

.pricing-card .btn {
    width: 100%;
}

.upgrade-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Header Buttons */
.btn-outline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 6px);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--maya-gold);
    color: var(--text-primary);
}

.btn-gold {
    background: var(--maya-gold);
    color: #000;
    border: none;
}

.btn-gold:hover {
    background: #d4b76a;
}

.btn-premium {
    background: linear-gradient(135deg, var(--maya-gold), #d4b76a);
    color: #000;
    border: none;
    font-weight: 600;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2d4d7;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-google img {
    filter: none;
}

/* User menu in header */
.header-actions .user-menu {
    padding: 0.25rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg, 8px);
}

.header-actions .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.header-actions .user-name {
    font-size: 0.85rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-actions .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
}

.header-actions .btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile */
@media (max-width: 768px) {
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .user-menu {
        padding: 0.25rem 0.5rem;
    }
    
    .header-actions .user-info {
        display: none;
    }
    
    .btn-pay-badge .pay-text {
        display: none;
    }
    
    .btn-outline span {
        display: none;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.premium {
        transform: none;
    }
    
    .auth-content,
    .upgrade-content {
        padding: 1.5rem;
    }
}
