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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    padding: 20px;
    color: #333;
}

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

/* Header */
header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9em;
    color: #7f8c8d;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.9em;
}

.btn:hover {
    background: #f5f5f5;
}

.last-update {
    font-size: 0.85em;
    color: #95a5a6;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.metric-card h3 {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.metric-value {
    font-size: 2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.metric-change {
    font-size: 0.9em;
    font-weight: 500;
}

.metric-change.positive {
    color: #2ecc71;
}

.metric-change.negative {
    color: #e74c3c;
}

.metric-label {
    font-size: 0.85em;
    color: #7f8c8d;
}

/* Calendar */
.calendar-section {
    margin-bottom: 20px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-container h2 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #2c3e50;
}

.chart-description {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 15px;
}

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

.calendar-header button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1.5em;
}

.calendar-header button:hover {
    background: #e0e0e0;
}

.calendar-header h3 {
    font-size: 1.2em;
    color: #2c3e50;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
    color: #7f8c8d;
    padding: 10px 5px;
}

.day {
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fafafa;
    cursor: default;
}

.day.empty {
    border: none;
    background: transparent;
}

.day.has-data {
    cursor: pointer;
}

.day.has-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.day.bullish {
    background: #d1fae5;
    border-color: #10b981;
}

.day.bearish {
    background: #fee2e2;
    border-color: #ef4444;
}

.day.neutral {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.day-num {
    font-size: 0.9em;
    font-weight: 600;
    color: #2c3e50;
}

.day-sentiment {
    font-size: 0.75em;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

/* Charts */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-wrapper {
    height: 300px;
    width: 100%;
}

.chart-container.full-width .chart-wrapper {
    height: 400px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.3em;
    color: #2c3e50;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 2em;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-header button:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.day-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.metric label {
    display: block;
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.metric .value {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.metric .value.bullish {
    color: #10b981;
}

.metric .value.bearish {
    color: #ef4444;
}

.metric .value span {
    display: block;
    font-size: 0.7em;
    margin-top: 4px;
    opacity: 0.8;
}

.metric .change {
    display: block;
    font-size: 0.7em;
    margin-top: 4px;
}

.metric .change.pos {
    color: #10b981;
}

.metric .change.neg {
    color: #ef4444;
}

.day-headline {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.day-headline h3 {
    font-size: 1.1em;
    color: #2c3e50;
    line-height: 1.4;
}

.day-summary {
    color: #555;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .day-metrics {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.2em;
    }
}
