/* css/main.css - 主要樣式 */

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #e0e0e0;
}

/* ========== 容器 ========== */
.container {
    background: #2a2a2a;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ========== 頁首 ========== */
.header {
    background: #1f1f1f;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #3a3a3a;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.header:hover {
    transform: scale(1.02);
}

.header:hover .logo {
    filter: brightness(1.2);
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.subtitle {
    opacity: 0.7;
    font-size: 14px;
    color: #b0b0b0;
}

/* ========== 標語區塊 ========== */
.tagline-section {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.tagline-section:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.tagline-section a {
    text-decoration: none;
    display: block;
}

.tagline-section h2 {
    font-size: 16px;
    font-weight: 500;
    color: #60a5fa;
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.tagline-section h2 .check-more {
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    opacity: 0.85;
}

.tagline-section:hover h2 {
    color: #93c5fd;
}

/* ========== 登入容器 ========== */
.login-container {
    padding: 30px;
}

/* ========== 安全徽章 ========== */
.security-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-icon {
    font-size: 20px;
}

.security-text {
    text-align: left;
    flex: 1;
}

.security-text strong {
    color: #3b82f6;
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.security-text small {
    color: #7a7a7a;
    font-size: 11px;
}

/* ========== 登入按鈕 ========== */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    animation: breathingGlow 3s ease-in-out infinite;
}

@keyframes breathingGlow {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.8);
        box-shadow: 
            0 0 20px rgba(59, 130, 246, 0.3),
            0 0 40px rgba(59, 130, 246, 0.2),
            0 0 60px rgba(59, 130, 246, 0.1),
            inset 0 0 20px rgba(59, 130, 246, 0.05);
    }
    50% {
        border-color: rgba(96, 165, 250, 1);
        box-shadow: 
            0 0 30px rgba(96, 165, 250, 0.6),
            0 0 60px rgba(96, 165, 250, 0.4),
            0 0 90px rgba(96, 165, 250, 0.2),
            inset 0 0 30px rgba(96, 165, 250, 0.1);
    }
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #252525 0%, #303030 100%);
    border-color: #60a5fa;
    animation-duration: 1s;
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2a2a2a;
    border-color: #333;
    animation: none;
}

/* ========== 功能列表 ========== */
.features {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #9a9a9a;
    font-size: 13px;
}

.feature-item.highlight {
    color: #22c55e;
    font-weight: bold;
}

.feature-icon {
    width: 20px;
    height: 20px;
    background: #1f1f1f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid #3a3a3a;
}

/* ========== 訊息框 ========== */
.error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 13px;
}

.success-msg {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 13px;
}

.info-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 20px;
    color: #22c55e;
    font-size: 13px;
}

.info-box strong {
    color: #22c55e;
    font-weight: 600;
}

/* ========== 載入動畫 ========== */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* ========== 語言支援 ========== */
.language-support {
    margin-top: 20px;
    padding: 15px;
    background: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    text-align: center;
}

.language-support-title {
    color: #9a9a9a;
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.language-support-list {
    color: #b0b0b0;
    font-size: 12px;
    line-height: 1.8;
}

/* ========== 頁尾資訊 ========== */
.demo-info {
    background: #1f1f1f;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    color: #9a9a9a;
    border: 1px solid #3a3a3a;
    text-align: center;
    line-height: 1.6;
}

.demo-info div {
    margin: 3px 0;
}

.demo-info a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.demo-info a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.auth0-badge {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6a6a6a;
    font-size: 11px;
}

.auth0-logo {
    height: 14px;
    opacity: 0.6;
}
