/* 頁面底色（無全版漸層）；內容區塊樣式保留於下方規則 */
body.page-money {
  margin: 0;
  font-family: 'Microsoft JhengHei', Arial, sans-serif;
  background: #ececec;
  min-height: 100vh;
}
body.page-money * {
  box-sizing: border-box;
}

/* Main Content */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1.5rem 1rem;
        }
        
        .card {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .card-title {
            font-size: 1.75rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 0.5rem;
            color: #1f2937;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .card-subtitle {
            text-align: center;
            color: #6b7280;
            font-size: 0.95rem;
            margin-bottom: 2rem;
        }
        
        .update-time {
            text-align: center;
            color: #9ca3af;
            font-size: 0.875rem;
            margin-bottom: 1rem;
        }
        
        .update-time.loading {
            color: #f59e0b;
        }
        
        .update-time.error {
            color: #ef4444;
        }
        
        /* Converter Section */
        .converter-section {
            max-width: 600px;
            margin: 0 auto 2rem;
        }
        
        .input-group {
            margin-bottom: 1.5rem;
        }
        
        .input-label {
            display: block;
            font-size: 1rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.75rem;
        }
        
        .amount-input-wrapper {
            position: relative;
        }
        
        .amount-input {
            width: 100%;
            padding: 1rem 1.5rem;
            font-size: 2rem;
            border: 3px solid #667eea;
            border-radius: 0.75rem;
            text-align: center;
            font-weight: bold;
            color: #1f2937;
            transition: all 0.3s;
        }
        
        .amount-input:focus {
            outline: none;
            border-color: #764ba2;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }
        
        .currency-select {
            width: 100%;
            padding: 1rem 1.5rem;
            font-size: 1.125rem;
            border: 2px solid #d1d5db;
            border-radius: 0.75rem;
            background: white;
            color: #1f2937;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667eea'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1.5rem;
            padding-right: 3rem;
        }
        
        .currency-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .swap-button {
            display: block;
            margin: 1rem auto;
            width: 3rem;
            height: 3rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 50%;
            color: white;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .swap-button:hover {
            transform: rotate(180deg) scale(1.1);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .swap-button svg {
            width: 1.5rem;
            height: 1.5rem;
        }
        
        /* Result Section */
        .result-section {
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
            border-radius: 1rem;
            padding: 2rem;
            text-align: center;
            margin-top: 2rem;
            border: 2px solid #667eea;
        }
        
        .result-label {
            font-size: 1rem;
            color: #6b7280;
            margin-bottom: 0.5rem;
        }
        
        .result-amount {
            font-size: 3rem;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 0.5rem;
        }
        
        .result-rate {
            font-size: 0.875rem;
            color: #9ca3af;
        }
        
        /* Exchange Rate Table */
        .rate-table-wrapper {
            overflow-x: auto;
            margin-top: 2rem;
        }
        
        .rate-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.875rem;
        }
        
        .rate-table thead {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .rate-table th {
            padding: 1rem 0.75rem;
            text-align: left;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .rate-table td {
            padding: 0.875rem 0.75rem;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .rate-table tbody tr:hover {
            background: #f9fafb;
        }
        
        .currency-name {
            font-weight: 600;
            color: #1f2937;
        }
        
        .currency-code {
            color: #6b7280;
            font-size: 0.75rem;
        }
        
        .rate-value {
            font-weight: 600;
            color: #667eea;
            text-align: right;
        }
        
        .rate-trend {
            text-align: center;
            font-size: 1.25rem;
        }
        
        .rate-trend.up {
            color: #10b981;
        }
        
        .rate-trend.down {
            color: #ef4444;
        }
        
        /* Popular Currencies */
        .popular-currencies {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .currency-card {
            background: white;
            border-radius: 0.75rem;
            padding: 1.5rem;
            border: 2px solid #e5e7eb;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .currency-card:hover {
            border-color: #667eea;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
        }
        
        .currency-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        
        .currency-card-name {
            font-weight: 600;
            color: #1f2937;
            font-size: 1.125rem;
        }
        
        .currency-card-flag {
            font-size: 2rem;
        }
        
        .currency-card-rate {
            font-size: 1.75rem;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 0.25rem;
        }
        
        .currency-card-label {
            font-size: 0.75rem;
            color: #9ca3af;
        }
        
        /* Info Box */
        .info-box {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .info-box h3 {
            font-size: 1.5rem;
            font-weight: bold;
            color: #1f2937;
            margin-bottom: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .info-content {
            color: #4b5563;
            line-height: 1.8;
        }
        
        .info-content h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            margin: 1.5rem 0 0.75rem 0;
        }
        
        .info-content p {
            margin-bottom: 1rem;
        }
        
        .info-content ul {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }
        
        .info-content li {
            margin: 0.5rem 0;
        }
        
        .info-content strong {
            color: #667eea;
            font-weight: 600;
        }
        
        .tip-box {
            background: #d1fae5;
            border-left: 4px solid #10b981;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }
        
        .warning-box {
            background: #fef3c7;
            border-left: 4px solid #f59e0b;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }
        
        .formula-box {
            background: #f9fafb;
            border-left: 4px solid #667eea;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
            font-family: 'Courier New', monospace;
        }
        
        .disclaimer {
            background: #fef2f2;
            border-left: 4px solid #ef4444;
            padding: 1rem 1.5rem;
            margin: 2rem 0;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            color: #991b1b;
        }
        
        .loading {
            text-align: center;
            padding: 2rem;
            color: #9ca3af;
        }
        
        .loading-spinner {
            display: inline-block;
            width: 2rem;
            height: 2rem;
            border: 3px solid #e5e7eb;
            border-top-color: #667eea;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .hero {
            text-align: center;
            padding: 2rem 1rem;
        }
        
        .hero img {
            max-width: 30px;
            height: auto;
            vertical-align: middle;
        }
        
        .hero a {
            display: inline-block;
            background: white;
            padding: 1rem 2rem;
            border-radius: 0.75rem;
            text-decoration: none;
            color: #667eea;
            font-weight: bold;
            font-size: 1.125rem;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: all 0.3s;
            margin-bottom: 2rem;
        }
        
        .hero a:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .calculator-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        

        .calculator-card {
            background: #eae6dd;
            border-radius: 15px;
            padding: 1rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .calculator-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.3);
        }
.calculator-card a {
    text-decoration: none; /* 去除底線 */
    font-weight: bold;     /* 粗體 */
    color: #222;           /* 顏色 #222 */
}
   .calculator-card h3 {
            color: #222;
            margin-bottom: 1rem;
            font-size: 1rem;
        }

        .calculator-card p {
            color: #666;
            line-height: 1;
        }

        .icon {
            font-size: 2rem;
            margin-bottom: 0rem;
        }
        @media (max-width: 640px) {
            .amount-input {
                font-size: 1.5rem;
                padding: 0.875rem 1rem;
            }
            
            .result-amount {
                font-size: 2rem;
            }
            
            .currency-select {
                font-size: 1rem;
            }
            
            .rate-table {
                font-size: 0.75rem;
            }
            
            .rate-table th,
            .rate-table td {
                padding: 0.625rem 0.5rem;
            }
        }
        
        @media (min-width: 640px) {
            .card {
                padding: 2.5rem 2rem;
            }
            
            .card-title {
                font-size: 2rem;
            }
        }
        
        @media (min-width: 768px) {
            .desktop-nav {
                display: flex;
            }
            
            .menu-btn {
                display: none;
            }
            
            .container {
                padding: 2.5rem 1.5rem;
            }
        }
        
        @media (min-width: 1024px) {
            .nav-link {
                font-size: 1rem;
            }
        }
