/* 簡化版認證彈窗樣式 */
/* auth-modals.css */

/* 彈窗背景遮罩 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 彈窗內容容器 */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

/* 關閉按鈕 */
.close-btn {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: #666;
}

/* 彈窗標題 */
.modal-content h2 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* 登入選項容器 */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* 表單群組 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 彈窗專用按鈕樣式 */
.modal-content .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    font-family: inherit;
}

.modal-content .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-content .btn:active {
    transform: translateY(0);
}

.modal-content .btn:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Google 登入按鈕 */
.btn-google {
    background-color: #4285f4;
    color: white;
}

.btn-google:hover {
    background-color: #3367d6;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-google:disabled {
    background-color: #ccc;
}

/* Facebook 登入按鈕 */
.btn-facebook {
    background-color: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background-color: #166fe5;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-facebook:disabled {
    background-color: #ccc;
}

/* 電話號碼登入按鈕 */
.btn-phone {
    background-color: #28a745;
    color: white;
}

.btn-phone:hover {
    background-color: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-phone:disabled {
    background-color: #ccc;
}

/* 主要按鈕 */
.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:disabled {
    background-color: #ccc;
}

/* 次要按鈕 */
.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 按鈕圖示 */
.modal-content .btn i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* 旋轉動畫 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 登入資訊文字 */
.login-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* 訊息顯示 */
#phone-message {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
}

#phone-message[style*="green"] {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#phone-message[style*="red"] {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 驗證碼區域 */
#verification-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#verification-section .form-group {
    margin-bottom: 15px;
}

#verification-section .btn {
    margin-bottom: 10px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .login-options {
        gap: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* 防止 iOS Safari 縮放 */
    }
    
    .modal-content .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .modal-content .btn i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 5% auto;
        padding: 15px;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
    
    .modal-content h2 {
        font-size: 18px;
    }
    
    .modal-content .btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* 提高可訪問性 */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .modal-content .btn,
    .form-group input {
        animation: none;
        transition: none;
    }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #2d2d2d;
        color: #fff;
    }
    
    .modal-content h2 {
        color: #fff;
    }
    
    .form-group label {
        color: #ccc;
    }
    
    .form-group input {
        background-color: #3d3d3d;
        border-color: #555;
        color: #fff;
    }
    
    .form-group input:focus {
        border-color: #4caf50;
        background-color: #2d2d2d;
    }
    
    .login-info p {
        color: #ccc;
    }
    
    .login-info {
        border-top-color: #555;
    }
    
    #verification-section {
        border-top-color: #555;
    }
}