@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;600;700&family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --bg-main: #05060b;
    --bg-header: #101320;
    --bg-card: #11141f;
    --bg-card-soft: #181c2a;
    --border-card: #262b3d;
    --text-main: #f5f6ff;
    --text-sub: #969ab8;
    --accent-blue: #4f7dff;
    --accent-cyan: #4ee6c1;
    --accent-magenta: #ff4ecd;
    --accent-yellow: #ffd766;
    --accent-green: #7be27a;
}

/* 기본 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background: radial-gradient(circle at top, #151829 0, #05060b 55%);
    color: var(--text-main);
}

/* 헤더 */
header {
    text-align: center;
    padding: 26px 0 16px;
    background: linear-gradient(180deg, #181c2a 0%, #0a0b11 100%);
    border-bottom: 1px solid #292e40;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

header h1 {
    font-size: 32px;
    margin: 0;
    color: #f5f6ff;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(79, 125, 255, 0.9);
}

header p {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-sub);
}

/* 메인 컨테이너 */
.container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto 40px;
}

/* 카드 공통 */
.card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #090b12 100%);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
    border: 1px solid var(--border-card);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    left: -2px;
    top: -2px;
    right: -2px;
    height: 3px;
    background: linear-gradient(90deg, #4ee6c1, #4f7dff, #ff4ecd);
    opacity: 0.9;
}

.card h2 {
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 19px;
    color: #ffffff;
}

.card h3 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 15px;
    color: #e1e3ff;
}

.card-desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 0;
    margin-bottom: 14px;
}

/* 입력 폼 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 20px;
    margin-top: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    color: #c8ccf3;
}

.form-group input,
.form-group select {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #2d3350;
    font-size: 14px;
    background: #090b14;
    color: var(--text-main);
}

.form-group input::placeholder {
    color: #62688b;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.35);
}

.form-actions {
    grid-column: 1 / -1;
    text-align: right;
}

button[type="submit"] {
    padding: 9px 20px;
    border-radius: 999px;
    border: none;
    background: radial-gradient(circle at 10% 0%, #ff4ecd 0, #4f7dff 45%, #4ee6c1 100%);
    color: #05060b;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

button[type="submit"]:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* 상단 레이아웃 */
.top-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.left-panel .card + .card {
    margin-top: 12px;
}

/* 타이머 */
.timer-value {
    font-size: 20px;
    font-family: "Roboto Mono", monospace;
    color: var(--accent-yellow);
    margin-top: 6px;
}

.timer-sub {
    margin-top: 8px;
    font-size: 12px;
    font-family: "Roboto Mono", monospace;
    color: var(--text-sub);
    line-height: 1.4;
}

/* 도넛 */
.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#lifeDonutChart {
    max-width: 260px;
    max-height: 260px;
    width: 100%;
    height: 260px !important;
    margin-top: 10px;
}

.donut-label {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    color: var(--text-sub);
}

/* 남은 시간 활동 카드 */
#remaining-activities {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}

.activity-card {
    background: radial-gradient(circle at top left, #232841 0, #0c0e17 55%);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
    border: 1px solid #323853;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-title {
    font-size: 11px;
    color: var(--text-sub);
}

.activity-value {
    font-family: "Roboto Mono", monospace;
    font-size: 18px;
    font-weight: 700;
}

.activity-card:nth-child(1) .activity-value { color: var(--accent-cyan); }
.activity-card:nth-child(2) .activity-value { color: var(--accent-blue); }
.activity-card:nth-child(3) .activity-value { color: var(--accent-green); }
.activity-card:nth-child(4) .activity-value { color: var(--accent-yellow); }
.activity-card:nth-child(5) .activity-value { color: var(--accent-magenta); }
.activity-card:nth-child(6) .activity-value { color: #ff9a4e; }

.activity-sub {
    font-size: 11px;
    color: var(--text-sub);
}

/* 하단 카드 공통 */
.bottom-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* 라이프스타일 박스 */
.lifestyle-box {
    background: var(--bg-card-soft);
    border-left: 4px solid var(--accent-cyan);
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
}

.sub-stat {
    font-size: 11px;
    color: var(--text-sub);
}

.bmi-label-chip {
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08); /* 카드보다 살짝 밝은 배경 */
    color: #7dd3fc; /* Blue-Neon 느낌 */
}

/* 생활 습관 랭킹 */
#habit-rankings {
    margin-top: 6px;
}

.habit-row {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    font-size: 12px;
}

.habit-label {
    color: #d0d3ff;
}

.habit-bar-track {
    background: #1b2033;
    border-radius: 999px;
    overflow: hidden;
    height: 8px;
}

.habit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f7dff, #4ee6c1);
}

.habit-percent {
    text-align: right;
    font-family: "Roboto Mono", monospace;
    font-size: 11px;
    color: var(--text-sub);
}

/* AI 건강 점수 */
.ai-score {
    font-size: 26px;
    color: var(--accent-cyan);
    font-family: "Roboto Mono", monospace;
    margin-top: 4px;
}

/* 삶의 밸런스 바 */
#balance-chart {
    margin-top: 10px;
    height: 24px;
    background: #161a2a;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.balance-segment {
    height: 100%;
    font-size: 0;
}

.balance-work  { background: var(--accent-blue); }
.balance-self  { background: var(--accent-green); }
.balance-leisure { background: var(--accent-yellow); }

#balance-desc {
    font-size: 1rem;              /* 기존보다 20~25% 더 큼 */
    color: #d8d8d8;               /* 너무 밝지도 어둡지도 않게 */
    margin-top: 10px;
    line-height: 1.45;            /* 줄 간격 여유 있게 */
    font-weight: 400;             /* 가벼운 두께 */
}

@media (min-width: 768px) {
    #balance-desc {
        font-size: 1.1rem;        /* PC에서는 더 읽기 좋게 */
    }
}

/* 반응형 */
@media (max-width: 960px) {
    .top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 26px;
    }
}

/* Footer Base */
.site-footer {
    margin-top: 60px;
    padding: 35px 20px;
    background: #0f1219;
    border-top: 1px solid #272a33;
    color: #c9ccd4;
    font-size: 0.92rem;
}

/* Large title */
.site-footer .footer-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #4ee6c1;
    margin-bottom: 14px;
}

/* Kaggle subsection title */
.site-footer .footer-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    color: #aab2ff;
    margin: 18px 0 6px 0;
}

/* Kaggle links */
.site-footer .footer-kaggle a {
    color: #70b8ff;
    text-decoration: none;
}

.site-footer .footer-kaggle a:hover {
    text-decoration: underline;
}

/* License notice */
.site-footer .footer-license {
    margin-top: 20px;
    color: #9ca0aa;
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Copyright */
.site-footer .copyright {
    margin-top: 25px;
    font-size: 0.85rem;
    color: #8b8f97;
    text-align: center;
}
