* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
    color: #1565c0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.calculator {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1565c0;
    font-size: 1.1rem;
}

.forex-select, .lot-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #1976d2;
    border-radius: 8px;
    font-size: 1rem;
    background: #f3f8ff;
    transition: all 0.3s ease;
}

.forex-select:focus, .lot-input:focus {
    outline: none;
    border-color: #42a5f5;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    background: white;
}

.quick-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 8px 16px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #42a5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

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

.result-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f3f8ff 0%, #e3f2fd 100%);
    border-radius: 10px;
    border: 2px solid #1976d2;
}

.result-section h3 {
    color: #1565c0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.result-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-item .label {
    font-weight: bold;
    color: #1565c0;
}

.result-item .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1976d2;
}

.disclaimer {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border-left: 5px solid #ff9800;
}

.disclaimer p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #6c757d;
    font-size: 0.95rem;
}

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

.forex-list {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.forex-list h2 {
    color: #1565c0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
}

th {
    padding: 15px 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #1565c0;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    color: #1565c0;
}

tbody tr:hover {
    background: #f3f8ff;
    transition: background 0.3s ease;
}

tbody tr:nth-child(even) {
    background: #f3f8ff;
}

tbody tr:nth-child(even):hover {
    background: #e3f2fd;
}

tbody tr.selected {
    background: #e3f2fd !important;
    border-left: 4px solid #1976d2;
}

/* 載入指示器 */
#loadingIndicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #1565c0;
    font-weight: bold;
    margin: 0;
}

/* 錯誤訊息 */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.error-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 20px;
}

.error-content h3 {
    color: #f44336;
    margin-bottom: 15px;
}

.error-content p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.error-content button {
    background: #1976d2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-content button:hover {
    background: #42a5f5;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator {
        padding: 20px;
    }
    
    .quick-buttons {
        justify-content: center;
    }
    
    .result-box {
        grid-template-columns: 1fr;
    }
    
    .forex-list {
        padding: 20px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 6px;
    }
}

/* 最小單位提示訊息 */
.minimum-lot-message {
    margin-top: 15px;
    animation: slideIn 0.3s ease;
}

.message-content {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #856404;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.message-content span {
    flex: 1;
}

.message-content button {
    background: none;
    border: none;
    color: #856404;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.message-content button:hover {
    color: #d63031;
}

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