/* Market Page */

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #374151;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    display: flex;
}

.back-btn:hover {
    background: #f3f4f6;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

/* Temperature Card */
.temp-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #e5e7eb;
}

.temp-card.fear {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.temp-card.greed {
    border-color: #86efac;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.temp-gauge {
    margin-bottom: 16px;
}

.temp-bar {
    height: 12px;
    background: linear-gradient(to right, #ef4444, #f59e0b, #22c55e);
    border-radius: 6px;
    position: relative;
    margin-bottom: 8px;
}

.temp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.temp-pointer {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #374151;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.8s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.temp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}

.temp-result {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.temp-emoji {
    font-size: 2rem;
}

.temp-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.temp-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Chart Card */
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chart-container {
    height: 200px;
    position: relative;
}

/* Indicator Cards */
.indicator-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ind-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #e5e7eb;
}

.ind-card.good {
    border-left-color: #22c55e;
}

.ind-card.neutral {
    border-left-color: #f59e0b;
}

.ind-card.bad {
    border-left-color: #ef4444;
}

.ind-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ind-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}

.ind-trend {
    font-size: 0.75rem;
    font-weight: 600;
}

.ind-trend.up {
    color: #dc2626;
}

.ind-trend.down {
    color: #16a34a;
}

.ind-trend.stable {
    color: #6b7280;
}

.ind-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.ind-change {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.ind-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* Economic Section */
.economic-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.econ-group {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.econ-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.econ-item {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.econ-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.econ-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.econ-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

.econ-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.no-data {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

/* Calendar Section */
.calendar-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cal-group {
    margin-bottom: 12px;
}

.cal-group:last-child {
    margin-bottom: 0;
}

.cal-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.cal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: #374151;
}

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

.cal-item.today {
    font-weight: 600;
    color: #1f2937;
}

.cal-icon {
    font-size: 0.7rem;
    flex-shrink: 0;
}

.cal-date {
    font-size: 0.8rem;
    color: #9ca3af;
    min-width: 40px;
}

.cal-label {
    flex: 1;
}

/* News Section */
.news-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.news-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-headline {
    font-size: 0.88rem;
    color: #1f2937;
    line-height: 1.4;
    margin: 0 0 4px 0;
}

.news-summary {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 2px 0 4px 0;
    line-height: 1.4;
    padding-left: 8px;
    border-left: 2px solid #e5e7eb;
}

.news-source {
    font-size: 0.75rem;
    color: #9ca3af;
}

.news-time {
    margin-left: 6px;
}

/* Clickable Items */
.ind-card.clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ind-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.econ-item.clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.econ-item.clickable:hover {
    background: #f0f4ff;
}

.econ-item.clickable::after {
    content: '›';
    float: right;
    color: #9ca3af;
    font-size: 1.2rem;
    margin-top: -20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-status {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.modal-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.modal-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.modal-meaning {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    margin: 0;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.modal-section p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.modal-chart-container {
    height: 200px;
    position: relative;
}

/* Updated At */
.updated-at {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    padding: 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .indicator-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ind-card {
        padding: 12px;
    }

    .ind-value {
        font-size: 1.2rem;
    }

    .chart-container {
        height: 180px;
    }
}
