:root {
    --bg-color: #f8f9fa; /* 밝은 회색 배경 */
    --panel-bg: #ffffff; /* 흰색 카드 배경 */
    --primary-color: #333333; /* 짙은 회색 (강조) */
    --accent-color: #007bff; /* 파란색 (포인트) */
    --text-color: #333333; /* 기본 텍스트 */
    --text-secondary: #6c757d; /* 보조 텍스트 */
    --border-color: #e9ecef; /* 연한 테두리 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; /* 가독성 좋은 산세리프 폰트 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.logo-area {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* --- Main Layout --- */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --- Sidebar Navigation --- */
nav {
    width: 240px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none; /* a 태그용 */
    display: block; /* a 태그용 */
}

.nav-btn:hover {
    background: #f1f3f5;
    color: var(--primary-color);
}

.nav-btn.active {
    background: #e7f5ff; /* 아주 연한 파란색 */
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

/* --- Content Area --- */
#content-container {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    max-width: 1200px; /* 너무 넓어지지 않게 제한 */
    margin: 0 auto;
}

/* --- Content Panels & Cards --- */
.panel {
    margin-bottom: 3rem;
}

.panel h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.panel h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.panel p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Grid Layout for Apps/Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.app-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #ced4da;
}

.app-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.app-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.app-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1; /* 내용을 위로 밀어올림 */
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 10px;
    font-weight: 500;
}

.links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 15px;
    transition: color 0.2s;
}

.links a:hover {
    text-decoration: underline;
}

/* --- Music Player (Minimal) --- */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50px; /* 둥근 캡슐 모양 */
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-md);
    z-index: 200;
    max-width: 300px;
}

.music-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow: hidden;
    white-space: nowrap;
    max-width: 150px;
}

.music-controls button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 0 2px;
}

.music-controls button:hover {
    color: var(--accent-color);
}

#volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    background: #e9ecef;
    border-radius: 2px;
    outline: none;
    margin-left: 5px;
    vertical-align: middle;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
}

#volume-slider::-webkit-slider-thumb:hover {
    background: var(--accent-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #adb5bd;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }
    .nav-btn {
        padding: 1rem;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    .nav-btn.active {
        border-left: none;
        border-bottom-color: var(--accent-color);
        background: transparent;
    }
    #content-container {
        padding: 1.5rem;
    }
}
