/* 高對比度配色方案 */
:root {
    --primary-dark: #003366; /* 深藍色 - 主色 */
    --primary-medium: #00509E; /* 中藍色 */
    --primary-light: #1E88E5; /* 淺藍色 */
    --secondary-dark: #D84315; /* 深橙色 */
    --secondary-light: #FF9800; /* 淺橙色 */
    --text-dark: #212121; /* 深灰文字 */
    --text-medium: #424242; /* 中灰文字 */
    --text-light: #FFFFFF; /* 白色文字 */
    --bg-light: #FFFFFF; /* 白色背景 */
    --bg-light-secondary: #F5F5F5; /* 淺灰背景 */
    --bg-dark: #003366; /* 深藍背景 */
    --success: #2E7D32; /* 成功綠色 */
    --warning: #FF8F00; /* 警告橙色 */
    --error: #C62828; /* 錯誤紅色 */
    --border-light: #E0E0E0; /* 淺邊框 */
    --border-dark: #BDBDBD; /* 深邊框 */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', 'Segoe UI', 'Arial', sans-serif;
}

body {
    background-color: var(--bg-light-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 標頭樣式 */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: var(--text-light);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    font-size: 2rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.instructions {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    font-size: 0.95rem;
}

.instructions p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions p:last-child {
    margin-bottom: 0;
}

/* 主要內容區 */
main {
    flex: 1;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--text-medium);
}

.section {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--primary-dark);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.section-title {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 連結容器樣式 */
.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.link-item {
    background-color: var(--bg-light-secondary);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.link-item:hover {
    border-color: var(--primary-light);
    background-color: rgba(30, 136, 229, 0.05);
}

.link-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-title i {
    color: var(--primary-medium);
}

.link-url {
    color: var(--primary-medium);
    word-break: break-all;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex: 1;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    border-left: 3px solid var(--primary-light);
}

/* 按鈕樣式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-dark);
    color: var(--text-light);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--primary-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-copy {
    background-color: var(--secondary-dark);
}

.btn-copy:hover {
    background-color: var(--secondary-light);
}

/* 訊息內容樣式 */
.message-content {
    background-color: var(--bg-light-secondary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-medium);
    white-space: pre-line;
    line-height: 1.7;
    font-size: 1rem;
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

/* 通知樣式 */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: var(--success);
    color: var(--text-light);
    padding: 18px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification i {
    font-size: 1.5rem;
}

/* 頁腳樣式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    color: var(--text-medium);
    font-size: 0.95rem;
    border-top: 2px solid var(--border-light);
    background-color: var(--bg-light);
    border-radius: 8px;
}

footer p {
    margin-bottom: 10px;
}

#footerCompanyName {
    color: var(--primary-dark);
    font-weight: bold;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-btn {
    background-color: var(--bg-light-secondary);
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.footer-btn:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

/* 響應式設計 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .links-container {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px;
    }
    
    .notification {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 列印樣式 */
@media print {
    .btn, .footer-btn, .notification {
        display: none !important;
    }
    
    .section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .message-content {
        max-height: none;
        overflow: visible;
    }
}