/* auth-modal.css - 登入彈窗樣式 */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.95), rgba(15, 25, 40, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-btn img {
    width: 24px;
    height: 24px;
}

.google-btn {
    background: white;
    color: #333;
}

.google-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.line-btn {
    background: #06C755;
    color: white;
}

.line-btn:hover {
    background: #05b44d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.auth-modal-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.auth-modal-divider::before {
    margin-right: 15px;
}

.auth-modal-divider::after {
    margin-left: 15px;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 使用者資訊顯示（桌面版）*/
.user-info-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.user-info-display:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 只有頭像時，減少 padding */
.user-info-display:has(.user-avatar:only-child) {
    padding: 8px;
}

/* 桌面版使用者頭像按鈕 */
.desktop-user-avatar {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    position: relative;
}

.desktop-user-avatar:hover {
    transform: scale(1.05);
    border-color: var(--text-primary);
}

.desktop-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 桌面版使用者選單（小選單）*/
.desktop-user-menu {
    position: fixed;
    top: 80px;
    right: 50px;
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.desktop-user-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.desktop-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.desktop-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.desktop-menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.desktop-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.desktop-logout {
    color: var(--error-color);
}

.desktop-logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 手機版樣式 */
@media (max-width: 768px) {
    .auth-modal {
        padding: 30px 20px;
        max-width: 350px;
    }
    
    .auth-modal-title {
        font-size: 24px;
    }
    
    .auth-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
}
