/* ===== 전역 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 네비게이션 ===== */
.navbar {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* ===== 버튼 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== 히어로 섹션 ===== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid var(--border-color);
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.floating-card h3 {
    font-size: 1.5rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== 섹션 타이틀 ===== */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== 기능 카드 ===== */
.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s;
}

.feature-link:hover {
    gap: 12px;
}

.feature-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.feature-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== 효과 섹션 ===== */
.benefits {
    padding: 80px 0;
    background: rgba(30, 41, 59, 0.5);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
}

.benefit-icon {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.benefit-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: var(--text-secondary);
}

/* ===== CTA 섹션 ===== */
.cta {
    padding: 80px 0;
    background: var(--gradient-1);
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 푸터 ===== */
footer {
    background: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== 게임 컨테이너 ===== */
.game-container,
.breathing-container,
.progress-container {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.game-header,
.breathing-header,
.progress-header {
    text-align: center;
    margin-bottom: 3rem;
}

.game-header h1,
.breathing-header h1,
.progress-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.game-header p,
.breathing-header p,
.progress-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ===== 게임 컨트롤 ===== */
.game-controls {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.control-panel {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.difficulty-selector label {
    font-weight: 600;
}

.difficulty-selector select {
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.stat-item i {
    color: var(--primary-color);
}

.stat-item strong {
    color: var(--success-color);
    font-size: 1.3rem;
}

/* ===== 게임 캔버스 ===== */
.game-canvas {
    background: #000000;
    border-radius: 20px;
    height: 600px;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.game-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.95);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    max-width: 500px;
    text-align: center;
}

.game-instruction h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.game-instruction ul {
    text-align: left;
    list-style: none;
    margin: 1.5rem 0;
}

.game-instruction li {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.green-dot,
.yellow-dot,
.red-x {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.green-dot {
    background: #10b981;
    box-shadow: 0 0 15px #10b981;
}

.yellow-dot {
    background: #fbbf24;
    box-shadow: 0 0 15px #fbbf24;
}

.red-x {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: bold;
}

.tip {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

/* ===== 게임 오브젝트 ===== */
.target {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.target:hover {
    transform: scale(1.1);
}

.target.green {
    background: radial-gradient(circle, #10b981, #059669);
    box-shadow: 0 0 20px #10b981;
}

.target.yellow {
    background: radial-gradient(circle, #fbbf24, #f59e0b);
    box-shadow: 0 0 20px #fbbf24;
}

.distractor {
    position: absolute;
    color: #ef4444;
    font-size: 30px;
    opacity: 0.6;
    pointer-events: none;
    font-weight: bold;
}

/* ===== 모달 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    max-width: 600px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-item {
    background: var(--dark-bg);
    padding: 1.5rem;
    border-radius: 15px;
}

.result-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-item p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-item h3 {
    font-size: 2rem;
    color: var(--success-color);
}

.result-message {
    background: rgba(99, 102, 241, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 호흡 명상 스타일 ===== */
.breathing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.duration-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-selector select {
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
}

.breathing-display {
    text-align: center;
    margin: 4rem 0;
}

.breathing-circle {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
    transition: transform 4s ease-in-out;
}

.breathing-circle.inhale {
    transform: scale(1.3);
}

.breathing-circle.exhale {
    transform: scale(0.8);
}

.circle-inner {
    background: var(--dark-bg);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.breathing-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.breathing-count {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.breathing-timer {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.breathing-timer strong {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* ===== 가이드 카드 ===== */
.breathing-guide,
.benefits-section {
    margin: 4rem 0;
}

.breathing-guide h3,
.benefits-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    text-align: center;
}

.guide-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.guide-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.guide-card p {
    color: var(--text-secondary);
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    text-align: center;
}

.benefit-card i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.benefit-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: var(--text-secondary);
}

/* ===== 명상 완료 모달 ===== */
.complete-message {
    font-size: 1.2rem;
    margin: 1.5rem 0;
}

.complete-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.complete-stats .stat {
    background: var(--dark-bg);
    padding: 1.5rem;
    border-radius: 15px;
}

.complete-stats .stat i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.complete-stats .stat p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.complete-stats .stat h3 {
    font-size: 2rem;
    color: var(--success-color);
}

.encouragement {
    background: rgba(16, 185, 129, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--success-color);
    margin: 2rem 0;
    font-size: 1.1rem;
    font-style: italic;
}

/* ===== 진행 상황 스타일 ===== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-info h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-info h2 {
    font-size: 2.5rem;
    color: var(--success-color);
    margin-bottom: 0.3rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 차트 섹션 ===== */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.chart-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.chart-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* ===== 달성 목표 ===== */
.achievements-section {
    margin: 4rem 0;
}

.achievements-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.achievement-card.unlocked {
    border-color: var(--success-color);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-card.unlocked .achievement-icon {
    color: var(--success-color);
}

.achievement-card.locked .achievement-icon {
    color: var(--text-secondary);
}

.achievement-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.achievement-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.achievement-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
}

/* ===== 최근 활동 ===== */
.recent-activity {
    margin: 4rem 0;
}

.recent-activity h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.activity-list {
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    padding: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--dark-bg);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    font-size: 2rem;
}

.activity-icon.game {
    color: var(--primary-color);
}

.activity-icon.meditation {
    color: var(--success-color);
}

.activity-info {
    flex: 1;
}

.activity-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.activity-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-menu a {
        padding: 0.3rem 0.5rem;
        font-size: 0.9rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .game-canvas {
        height: 400px;
    }

    .breathing-circle {
        width: 200px;
        height: 200px;
    }

    .circle-inner {
        width: 160px;
        height: 160px;
    }
}
