/* 匯率計算器專屬樣式 */

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; opacity: 0.95; }

/* 轉換器區域 */
.converter-section {
    margin: 2rem 0;
}

.converter-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 3px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

/* 貨幣類型標籤 */
.currency-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.type-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.type-tab:hover {
    border-color: var(--primary-color);
    background: rgba(247, 147, 26, 0.05);
}

.type-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

/* 貨幣輸入 */
.currency-input {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
}

.label-text {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.amount-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--light-gray);
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.amount-input:read-only {
    background: var(--light-gray);
    cursor: default;
}

/* 貨幣選擇 */
.currency-select-wrapper {
    margin-top: 0.75rem;
}

.currency-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.currency-select:hover {
    border-color: var(--primary-color);
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
}

/* 交換按鈕 */
.swap-button-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.swap-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-button:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
    border-color: var(--primary-color);
}

.swap-icon {
    display: inline-block;
    transition: var(--transition);
}

/* 匯率資訊 */
.rate-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    text-align: center;
}

.rate-text {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rate-text span {
    color: var(--primary-color);
}

.update-time {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* 快速轉換區域 */
.quick-convert-section {
    margin: 3rem 0;
}

.quick-convert-section h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.quick-convert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-convert-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.quick-convert-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.currency-pair {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.currency-pair-with-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.crypto-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
}

.fiat-flag {
    font-size: 1.2rem;
}

.arrow {
    color: var(--primary-color);
    font-weight: bold;
}

.conversion-rate {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* 功能特色 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 15px var(--shadow-color);
    text-align: center;
    border: 1px solid var(--border-color);
}

.feature-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.feature-card h3 { color: var(--text-color); margin-bottom: 1rem; }
.feature-card p { color: var(--text-color); opacity: 0.8; line-height: 1.6; }

/* 教學和FAQ */
.tutorial, .faq {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 3rem 0;
    box-shadow: 0 3px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.tutorial h2, .faq h2 { color: var(--text-color); margin-bottom: 1.5rem; }
.tutorial ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.tutorial li { margin-bottom: 0.75rem; line-height: 1.6; color: var(--text-color); }

.faq-item { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { color: var(--text-color); margin-bottom: 1rem; }
.faq-item p { color: var(--text-color); opacity: 0.85; line-height: 1.7; }

.tool-info {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin: 3rem 0;
}

.tool-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* 載入狀態 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 響應式設計 */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .converter-container { padding: 1.5rem; }
    .amount-input { font-size: 1.2rem; }
    .quick-convert-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* 暗色主題 */
[data-theme="dark"] .converter-container,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .tutorial,
[data-theme="dark"] .faq {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .amount-input {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

[data-theme="dark"] .amount-input:focus {
    background: #333;
}

[data-theme="dark"] .currency-select {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

[data-theme="dark"] .type-tab {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

[data-theme="dark"] .type-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

[data-theme="dark"] .swap-button {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .swap-button:hover {
    background: var(--primary-color);
}

[data-theme="dark"] .rate-info {
    background: #2a2a2a;
}

[data-theme="dark"] .quick-convert-card {
    background: #1a1a1a;
    border-color: #444;
}

[data-theme="dark"] .tool-info {
    background: #1a1a1a;
}
