:root {
    --available: #81c784; --booked: #ef9a9a; --primary: #2c3e50;
    --holiday: #e53935; --anniversary-bg: #fff9c4;
    --special-border: #ffd32a;
    --special-bg: #fffdf0;
    --summary-blue: #3498db;
    --bg-color: #f4f4f4;
    --card-bg: #fff;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --header-bg: #eee;
    --input-bg: #fff;
    --modal-bg: #fff;
}

[data-theme="dark"] {
    --available: #4caf50; --booked: #e57373; --primary: #5dade2;
    --holiday: #ff6b6b; --anniversary-bg: #5c4d00;
    --special-border: #ffd32a;
    --special-bg: #3d3a2a;
    --summary-blue: #5dade2;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e8e8e8;
    --text-secondary: #aaa;
    --border-color: #2c3e50;
    --header-bg: #1f3a5f;
    --input-bg: #0f3460;
    --modal-bg: #16213e;
}

body { font-family: 'Pretendard', sans-serif; background-color: var(--bg-color); padding: 20px; color: var(--text-color); transition: background-color 0.3s, color 0.3s; }

.header-container { text-align: center; margin-bottom: 20px; }
.nav-controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 15px; }
.nav-btn { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 20px; }
.current-month { font-size: 26px; font-weight: 800; color: var(--text-color); }

/* 테마 토글 버튼 */
.theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 999; }
.theme-btn { padding: 12px 16px; background: var(--card-bg); border: 2px solid var(--border-color); border-radius: 50px; cursor: pointer; font-size: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: all 0.3s; }
.theme-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
[data-theme="dark"] .theme-btn { background: var(--card-bg); border-color: var(--primary); }

.btn-group { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.action-btn { padding: 12px 18px; color: white; border: none; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 rgba(0,0,0,0.1); }
.btn-cal { background-color: #ff5e57; } .btn-list { background-color: #ff9f43; } .btn-copy { background-color: #feca57; color: #574b1f; }
.btn-excel { background-color: #1dd1a1; } .btn-save { background-color: #54a0ff; } .btn-load { background-color: #a29bfe; }

#capture-calendar-area { background-color: var(--card-bg); padding: 25px; border-radius: 15px; max-width: 1400px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: background-color 0.3s; }
.calendar-title { text-align: center; margin-bottom: 20px; }
.calendar-title h1 { margin: 0; font-size: 28px; color: var(--text-color); transition: color 0.3s; }
.calendar-title .sub-date-text { color: var(--text-secondary); font-weight: bold; margin-top: 5px; transition: color 0.3s; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-label { text-align: center; font-weight: bold; padding: 10px; background: var(--header-bg); border-radius: 5px; color: var(--text-color); transition: background-color 0.3s; }

.day-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px; min-height: 160px; position: relative; transition: all 0.3s; }
.day-card.special-day { border: 4px solid var(--special-border) !important; background-color: var(--special-bg) !important; transform: scale(1.02); z-index: 1; }

.date-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border-color); margin-bottom: 8px; padding-bottom: 4px; }
.date-num { font-weight: bold; font-size: 14px; cursor: pointer; padding: 2px 5px; border-radius: 4px; color: var(--text-color); }
.date-num:hover { background: var(--header-bg); }
.holiday-name { font-size: 11px; margin-left: 3px; font-weight: bold; }
.anni-name { font-size: 11px; margin-left: 5px; background: var(--anniversary-bg); padding: 1px 4px; border-radius: 3px; color: #f39c12; font-weight: bold; border: 1px solid #f39c12; }
.sun { color: var(--holiday); } .sat { color: #5dade2; }

.edit-mode-btn { cursor: pointer; font-size: 14px; color: var(--text-secondary); border: none; background: none; }
.court-row { display: flex; gap: 3px; margin-bottom: 4px; align-items: center; }
.time-label { font-size: 10px; width: 35px; color: var(--text-secondary); font-weight: bold; }
.court-btn { flex: 1; height: 24px; border: none; border-radius: 4px; background-color: var(--available); cursor: pointer; font-size: 10px; color: white; }
.court-btn.booked { background-color: var(--booked); color: #b71c1c; font-weight: bold; }
[data-theme="dark"] .court-btn.booked { color: #ffcdd2; }

.custom-container { display: flex; flex-direction: column; gap: 5px; }
.custom-entry { padding: 6px; border-radius: 6px; font-size: 12px; text-align: center; color: white; cursor: pointer; font-weight: bold; }
.custom-time-view { border-bottom: 1px solid rgba(255,255,255,0.3); margin-bottom: 2px; padding-bottom: 2px; }
.custom-add-btn { width: 100%; padding: 4px; font-size: 11px; border: 1px dashed var(--border-color); background: var(--header-bg); cursor: pointer; border-radius: 4px; color: var(--text-color); transition: background-color 0.3s; }

.summary-capture-area { padding: 40px; background: #ffffff; width: 600px; }
.summary-header { text-align: center; margin-bottom: 40px; }
.summary-header h1 { font-size: 36px; color: #2c3e50; margin: 0; }
.summary-header p { font-size: 20px; color: #666; margin-top: 5px; font-weight: bold; }
.summary-card { background: #f8f9fa; border-radius: 15px; padding: 25px; margin-bottom: 25px; border-left: 10px solid var(--summary-blue); }
.summary-date { font-size: 24px; font-weight: 800; color: #333; margin-bottom: 15px; }
.summary-list { list-style: none; padding: 0; margin: 0; }
.summary-item { font-size: 19px; color: #444; margin-bottom: 10px; display: flex; align-items: center; }
.summary-item::before { content: "•"; margin-right: 12px; color: #888; font-size: 24px; }

#modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; justify-content: center; align-items: center; }
.modal { background: var(--modal-bg); padding: 25px; border-radius: 15px; width: 340px; text-align: center; transition: background-color 0.3s; }
.modal h3 { color: var(--text-color); }
.modal input { width: 90%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 15px; margin-bottom: 10px; text-align: center; background: var(--input-bg); color: var(--text-color); transition: all 0.3s; }
.modal input::placeholder { color: var(--text-secondary); }
.modal label { color: var(--text-color); }
.modal-buttons { display: flex; gap: 8px; margin-top: 15px; }
.m-btn { flex: 1; padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; color: white; }
.m-save { background: #2196F3; } .m-delete { background: #f44336; } .m-cancel { background: #7f8c8d; }