:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.round-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 0 1rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 좌측 패널: 오늘의 할 일 */
.todo-panel {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 6rem;
}

.todo-item {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: transform 0.2s, opacity 0.2s;
    border-left: 4px solid var(--primary-color);
}

.todo-item:hover {
    transform: translateX(4px);
}

.todo-item input[type="checkbox"] {
    margin-top: 0.3rem;
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.todo-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
    background: #f8fafc;
    border-left-color: var(--border-color);
}

.todo-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.todo-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.2rem;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* 우측 패널: 단원 목록 */
.units-panel {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.25rem;
    background: #f8fafc;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-content {
    padding: 0;
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.unit-row {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.1s;
}

.unit-row:hover {
    background: #fcfcfd;
}

.unit-info {
    flex: 1;
}

.unit-name {
    font-weight: 500;
    display: block;
}

.unit-progress {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.start-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.start-btn:hover {
    background-color: var(--primary-hover);
}

.start-btn:disabled {
    background-color: var(--success-color);
    cursor: default;
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    .todo-panel {
        position: static;
    }
}
