/* 기본 및 테마 변수 설정 */
:root {
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Light Theme (New) */
    --text-light: #2D3748; /* Dark Gray for text */
    --subtext-light: #718096; /* Medium Gray for subtext */
    --bg-light: #F7FAFC; /* Very light gray/off-white */
    --card-light: #FFFFFF; /* White */
    --border-light: #E2E8F0; /* Light Gray for borders */
    --accent-light: #4263EB; /* Indigo/Blue for accents */
    --shadow-light: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hover-shadow-light: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);

    /* Dark Theme */
    --text-dark: #f9fafb;
    --subtext-dark: #9ca3af;
    --bg-dark: #111827;
    --card-dark: #1f2937;
    --border-dark: #374151;
    --accent-dark: #a78bfa;
    --shadow-dark: 0 4px 6px -1px rgb(255 255 255 / 0.05), 0 2px 4px -2px rgb(255 255 255 / 0.05);
}

html {
    --text: var(--text-light);
    --subtext: var(--subtext-light);
    --background: var(--bg-light);
    --card-bg: var(--card-light);
    --border-color: var(--border-light);
    --accent-color: var(--accent-light);
    --shadow: var(--shadow-light);
    --hover-shadow: var(--hover-shadow-light);
}

html[data-theme="dark"] {
    --text: var(--text-dark);
    --subtext: var(--subtext-dark);
    --background: var(--bg-dark);
    --card-bg: var(--card-dark);
    --border-color: var(--border-dark);
    --accent-color: var(--accent-dark);
    --shadow: var(--shadow-dark);
    --hover-shadow: var(--shadow-dark); /* Dark theme might not need a different hover shadow */
}

/* 기본 스타일 */
body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

.page-container {
    display: flex;
    min-height: 100vh;
}

/* LNB (Left Navigation Bar) */
.lnb {
    width: 260px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: width 0.3s, padding 0.3s, background-color 0.3s, border-color 0.3s;
}
/* Other LNB styles remain the same */
.lnb-header { margin-bottom: 40px; }
.lnb-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 20px; font-weight: 700; }
.lnb-logo i { color: var(--accent-color); }
.lnb-menu { list-style: none; margin: 0; padding: 0; flex-grow: 1; }
.lnb-menu-item a { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 8px; text-decoration: none; color: var(--subtext); font-weight: 500; transition: background-color 0.2s, color 0.2s; }
.lnb-menu-item a:hover { background-color: var(--background); color: var(--text); }
.lnb-menu-item.active a { background-color: var(--accent-color); color: white; }
.lnb-footer { padding-top: 20px; border-top: 1px solid var(--border-color); }
.theme-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 15px; border-radius: 8px; color: var(--subtext); }
.theme-toggle:hover { background-color: var(--background); }


/* 메인 콘텐츠 */
.main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.main-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.main-header h1 { margin: 0; font-size: 28px; }
.hamburger-menu { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }


/* --- New Box Model --- */
.content-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease-in-out;
}

.content-box:hover {
    box-shadow: var(--hover-shadow);
}


/* 바로가기 그리드 (using the new box model) */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.shortcut-box {
    /* Inherits from .content-box but as a link */
    display: block;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--text);
    box-shadow: none; /* Initial state no shadow */
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.shortcut-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}
.shortcut-box.placeholder {
    background-color: transparent;
    border-style: dashed;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none !important;
    transform: none !important;
}
.shortcut-box h3 { margin: 0 0 10px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.shortcut-box h3 i { color: var(--accent-color); }
.shortcut-box p { margin: 0; color: var(--subtext); font-size: 14px; }


/* Lotto Page Styles */
#lotto-section {
    max-width: 640px;
    margin: 0 auto;
}
.games { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.game { padding: 20px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--border-color); }
.game:last-child { border-bottom: none; }
.label { font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.balls { display: flex; gap: 10px; grid-column: 1 / -1; margin-bottom: 16px; }
.ball { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px); animation: fadeInUp 0.5s ease-out forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.badge { font-size: 13px; color: var(--accent-color); font-weight: bold; background-color: rgba(66, 99, 235, 0.1); padding: 4px 8px; border-radius: 6px; }
.copy { font-size: 14px; font-weight: 500; background: var(--background); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 16px; color: var(--subtext); cursor: pointer; justify-self: end; transition: background 0.2s; }
.copy:hover { background: var(--border-color); }

/* Generic Button Style */
.button-primary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}
.button-primary:hover {
    box-shadow: var(--hover-shadow);
}


/* Contact & AI Page Styles */
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group label { font-size: 14px; color: var(--subtext); margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea { padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--background); color: var(--text); font-family: var(--font-family); font-size: 16px; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); background: var(--card-bg); }

#image-preview-container { margin-top: 25px; margin-bottom: 25px; }
#image-preview { max-width: 100%; max-height: 400px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border-color); }
#label-container { display: flex; flex-direction: column; gap: 15px; margin-top: 25px; }
/* ... other specific styles ... */


/* --- Responsive Overrides --- */
@media (max-width: 1200px) {
    .page-container { flex-direction: column; }
    .lnb { width: 100%; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 20px; border-right: none; border-bottom: 1px solid var(--border-color); }
    .hamburger-menu { display: block; }
    .lnb-header { margin-bottom: 0; }
    .lnb-menu { display: none; } /* Hide menu by default on tablet */
    .lnb-footer { display: none; } /* Hide footer by default on tablet */
    
    .lnb.show {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 260px;
        flex-direction: column;
        align-items: stretch;
        background-color: var(--card-bg);
        z-index: 1000;
        padding: 20px;
        border-right: 1px solid var(--border-color);
    }
    .lnb.show .lnb-menu, .lnb.show .lnb-footer { display: flex; flex-direction: column; }
    .lnb.show .lnb-menu { flex-grow: 1; }
    .lnb.show .lnb-footer { border-top: 1px solid var(--border-color); padding-top: 20px; }
    
    .main-content { padding: 20px; }
    .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .shortcut-grid { grid-template-columns: 1fr; }
    .main-header {
      position: sticky;
      top: 0;
      background: var(--background);
      padding: 10px 0;
      margin-left: -20px;
      margin-right: -20px;
      padding-left: 20px;
      padding-right: 20px;
    }
}