:root {
    --bg-color: #f8f9fa;
    --text-color: #2c3e50;
    --accent-color: #2F5496;
    --card-bg: rgba(255, 255, 255, 0.9);
    --tooltip-bg: rgba(30, 30, 30, 0.95);
    --font-main: 'Outfit', sans-serif;
    
    /* Spectrum Colors */
    --color-enemy: #a50f15;
    --color-friend: #006d2c;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1400px;
    padding: 2rem;
    text-align: center;
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--color-enemy), var(--color-friend));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-weight: 300;
    margin: 0.5rem 0;
    color: #555;
    font-size: 1.5rem;
}

.highlight {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(47, 84, 150, 0.2);
    z-index: -1;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Legend */
.legend-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.legend-bar {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-enemy), #f2f2f2, var(--color-friend));
    border-radius: 2px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Chart Container */
#chart-container {
    width: 100%;
    height: 600px;
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    /* Dotted background pattern */
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--tooltip-bg);
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: none;
    font-size: 0.9rem;
    max-width: 300px;
    text-align: left;
    z-index: 100;
    transition: opacity 0.2s, transform 0.2s;
    backdrop-filter: blur(5px);
}

.tooltip.hidden {
    opacity: 0;
    visibility: hidden;
}

.tooltip h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}

.tooltip .meta {
    font-size: 0.8rem;
    color: #bbb;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.tooltip .desc {
    line-height: 1.4;
}

/* Search Box */
.controls {
    margin-top: 2rem;
}

#search-box {
    padding: 10px 20px;
    width: 300px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 1rem;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

#search-box:focus {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(47, 84, 150, 0.1);
    width: 320px;
}

/* To-do Section */
.todo-section {
    margin-top: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 2rem 2.5rem;
    text-align: left;
}

.todo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.3rem 0;
}

.todo-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0 0 1.5rem 0;
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 800px) {
    .todo-list {
        columns: 1;
    }
}

.todo-list li {
    break-inside: avoid;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.todo-list label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #444;
    transition: color 0.2s;
}

.todo-list input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent-color);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.todo-list label:has(input:checked) {
    text-decoration: line-through;
    color: #bbb;
}

.todo-ref {
    color: #aaa;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: 4px;
}

footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #999;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}
