/* Thai Payment Optimizer - 모바일 퍼스트 스타일 */

:root {
    /* 태국 테마 컬러 - 라이트 모드 */
    --primary-gold: #FFD700;
    --primary-blue: #0066CC;
    --secondary-blue: #003D7A;
    --accent-orange: #FF6B35;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #E0E0E0;
    --success-green: #10B981;
    --warning-yellow: #F59E0B;
    --error-red: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* 다크 모드 */
    --primary-gold: #FFD700;
    --primary-blue: #4A9EFF;
    --secondary-blue: #6BA3FF;
    --accent-orange: #FF8C5A;
    --bg-light: #1A1A1A;
    --bg-white: #2D2D2D;
    --text-dark: #F5F5F5;
    --text-gray: #CCCCCC;
    --text-light: #999999;
    --border-color: #404040;
    --success-green: #34D399;
    --warning-yellow: #FBBF24;
    --error-red: #F87171;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-title::before {
    content: '🇹🇭';
    font-size: 1.5rem;
}

.exchange-rate-display {
    font-size: 0.875rem;
    opacity: 0.9;
}

.exchange-rate-value {
    font-weight: 600;
    color: var(--primary-gold);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 메인 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 금액 입력 섹션 */
.amount-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.amount-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.amount-input {
    width: 100%;
    font-size: 2rem;
    font-weight: 700;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-align: right;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color 0.2s;
}

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

.amount-input::placeholder {
    color: var(--text-light);
}

.currency-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-gray);
    font-weight: 600;
}

.expected-thb {
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #FFA500 100%);
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.quick-amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-btn {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.quick-btn:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.quick-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* 지역 선택 */
.location-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.location-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.location-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* 비교 결과 섹션 */
.comparison-section {
    margin-bottom: 1.5rem;
}

.comparison-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.comparison-card:hover {
    box-shadow: var(--shadow-md);
}

.comparison-card.recommended {
    border-color: var(--success-green);
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.comparison-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.method-info {
    flex: 1;
}

.method-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.method-icon {
    font-size: 1.5rem;
}

.recommendation-badge {
    background: var(--success-green);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.final-amount {
    text-align: right;
}

.final-amount-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.final-amount-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.fee-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

.fee-amount {
    font-weight: 600;
    color: var(--error-red);
}

.fee-percentage {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.fee-details-toggle {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    text-decoration: underline;
}

.fee-details {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.fee-details.show {
    display: block;
}

.fee-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.fee-detail-item:last-child {
    border-bottom: none;
}

.savings-info {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    color: white;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* 탭 네비게이션 */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-gray);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.tab-button.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 현금 환전 카드 */
.cash-exchange-card {
    background: var(--bg-white);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.cash-exchange-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.cash-exchange-rate {
    color: var(--primary-blue);
    font-weight: 600;
}

.cash-exchange-rating {
    color: var(--warning-yellow);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* FAQ 섹션 */
.faq-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.faq-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 푸터 */
.footer {
    background: var(--bg-white);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.footer-disclaimer {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.last-updated {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* 로딩 스피너 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 반응형 디자인 */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }

    .amount-input {
        font-size: 2.5rem;
    }

    .comparison-card {
        padding: 1.5rem;
    }

    .final-amount-value {
        font-size: 2rem;
    }

    .quick-amount-buttons {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) {
    .comparison-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 차트 섹션 */
.chart-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.chart-controls {
    margin-bottom: 1.5rem;
}

.period-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.period-btn:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.period-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.chart-legend {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .chart-container {
        height: 400px;
    }
}

/* 유틸리티 클래스 */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}
