/* ==========================================
   AI 시대 부자되기 - Design System & Sidebar Layout Styling
   ========================================== */

:root {
    --bg-dark: #070a13;
    --bg-sidebar: rgba(10, 16, 30, 0.75);
    --bg-surface: rgba(13, 20, 38, 0.6);
    --bg-surface-hover: rgba(22, 33, 62, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow-color: rgba(255, 255, 255, 0.12);
    
    /* Neon Colors */
    --color-stock: #10b981;     /* Emerald green */
    --color-crypto: #f59e0b;    /* Gold/Amber */
    --color-youtube: #ef4444;   /* Crimson Red */
    --color-software: #6366f1;  /* Electric Indigo */
    
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    
    /* Font Families */
    --font-heading: 'Outfit', 'Noto Sans KR', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
    
    /* Transitions & Shadow */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-neon: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #090e1a;
}
::-webkit-scrollbar-thumb {
    background: #1f293d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Background Ambient Glow */
.glow-bg {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}
.glow-purple {
    background: var(--color-software);
    top: 5%;
    left: -10%;
}
.glow-blue {
    background: #06b6d4;
    top: 40%;
    right: -10%;
}
.glow-green {
    background: var(--color-stock);
    bottom: 10%;
    left: 20%;
}

/* Glassmorphism Common Style */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

/* ==========================================
   App Sidebar Layout (Left)
   ========================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.app-sidebar {
    width: 300px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 28px 20px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-radius: 0;
    box-shadow: 8px 0 32px 0 rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.logo-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--color-software), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}
.sidebar-header strong {
    color: var(--color-stock);
}

/* Dropdown Select Box Container */
.select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.select-label, .menu-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.select-wrapper {
    position: relative;
    width: 100%;
}
.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    pointer-events: none;
}
.premium-select {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
}
.premium-select:focus {
    border-color: var(--color-software);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}
.premium-select option {
    background-color: #0b0f19;
    color: #fff;
}

/* Sidebar Menu List styling */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}
.sidebar-menu {
    display: none;
    list-style: none;
}
.sidebar-menu.active {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.menu-item {
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}
.menu-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

.step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

/* Active sidebar item styling based on selected domain */
#menu-software .menu-item.active {
    background: rgba(99, 102, 241, 0.07);
    color: #fff;
    font-weight: 700;
    border-left-color: var(--color-software);
}
#menu-software .menu-item.active .step-num {
    background: var(--color-software);
    color: #fff;
}

#menu-youtube .menu-item.active {
    background: rgba(239, 68, 68, 0.07);
    color: #fff;
    font-weight: 700;
    border-left-color: var(--color-youtube);
}
#menu-youtube .menu-item.active .step-num {
    background: var(--color-youtube);
    color: #fff;
}

#menu-crypto .menu-item.active {
    background: rgba(245, 158, 11, 0.07);
    color: #fff;
    font-weight: 700;
    border-left-color: var(--color-crypto);
}
#menu-crypto .menu-item.active .step-num {
    background: var(--color-crypto);
    color: #fff;
}

#menu-stock .menu-item.active {
    background: rgba(16, 185, 129, 0.07);
    color: #fff;
    font-weight: 700;
    border-left-color: var(--color-stock);
}
#menu-stock .menu-item.active .step-num {
    background: var(--color-stock);
    color: #fff;
}

/* ==========================================
   Right Main Area Layout
   ========================================== */
.app-container {
    margin-left: 300px;
    flex: 1;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1400px;
}

/* Top Dashboard Bar styling */
.dashboard-bar {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}
.bar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}
.circular-progress-wrapper {
    position: relative;
    width: 76px;
    height: 76px;
}
.progress-percentage-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.bar-titles h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.bar-titles p {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.bar-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 28px;
    flex: 0 1 auto;
}
.sub-indicator {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ind-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}
.ind-info strong {
    font-family: var(--font-heading);
    color: #fff;
}
.ind-bar-bg {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    overflow: hidden;
}
.ind-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Content Columns Layout */
.main-content-grid {
    display: grid;
    grid-template-columns: 1.7fr 1.3fr;
    gap: 28px;
    align-items: start;
}

/* Left Column: Content panels */
.panels-container {
    display: flex;
    flex-direction: column;
}
.content-panel {
    display: none;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.4s ease-in-out forwards;
}
.content-panel.active {
    display: flex;
}

.panel-header-block span {
    font-size: 0.72rem;
}
.panel-header-block h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin: 8px 0 10px 0;
}
.panel-header-block p {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

/* Right Column: Widgets */
.widgets-container {
    display: flex;
    flex-direction: column;
}
.widgets-group-card {
    display: none;
}
.widgets-group-card.active {
    display: block;
    animation: fadeIn 0.35s ease-in-out forwards;
}

/* 16:9 Video container */
.video-container-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.video-container-wrapper h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.video-badge-icon {
    color: var(--color-youtube);
}
.video-ratio-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.video-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Accordion Component */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}
.accordion-trigger {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}
.accordion-trigger h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-trigger .arrow {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    border-top: 1px solid transparent;
}

.accordion-item.open {
    border-color: rgba(255, 255, 255, 0.12);
}
.accordion-item.open .accordion-content {
    max-height: 1000px;
    padding: 20px 24px 24px 24px;
    border-top-color: var(--border-color);
}
.accordion-item.open .accordion-trigger .arrow {
    transform: rotate(180deg);
}

.accordion-content p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-bottom: 14px;
}
.step-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.step-list li {
    font-size: 0.92rem;
    color: var(--color-text-primary);
}
.step-list li p {
    margin-top: 4px;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.step-bullet-list {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step-bullet-list li {
    font-size: 0.88rem;
    color: var(--color-text-primary);
}
.step-bullet-list li ul {
    margin-top: 6px;
    padding-left: 18px;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #fff;
    margin: 4px 0;
    transition: var(--transition-smooth);
}
.download-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glow-color);
}

/* Code Block Component */
.code-block-container {
    position: relative;
    margin: 12px 0 6px 0;
    background: #04060b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}
.code-block-container pre {
    padding: 16px 20px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #e5e7eb;
}
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}
.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.copy-btn.copied {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--color-stock) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* AI Prompt Highlight Box */
.ai-prompt-box {
    background: rgba(99, 102, 241, 0.04);
    border: 1px dashed rgba(99, 102, 241, 0.25);
    padding: 20px;
    border-radius: 12px;
    margin-top: 14px;
}
.ai-prompt-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Checkboxes & Widgets on the right */
.checklist-card {
    padding: 24px;
}
.checklist-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.checklist-header-icon {
    color: var(--color-stock);
}
.checklist-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-smooth);
    user-select: none;
}
.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}
.checkbox-item input[type="checkbox"] {
    display: none;
}
.custom-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: transparent;
    transition: var(--transition-smooth);
    margin-top: 2px;
}
.checkbox-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.checkbox-item input[type="checkbox"]:checked + .custom-box {
    border-color: var(--color-stock);
    background: var(--color-stock);
    color: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.checkbox-item input[type="checkbox"]:checked ~ .checkbox-label {
    color: #fff;
    text-decoration: line-through rgba(255, 255, 255, 0.25);
}

/* Resources & Airtable Blocks */
.resource-block, .airtable-checkin-block {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.airtable-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.airtable-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    transition: var(--transition-smooth);
}
.airtable-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glow-color);
}
.airtable-btn.secondary {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.25);
    color: #22d3ee;
}
.airtable-btn.secondary:hover {
    background: rgba(6, 182, 212, 0.18);
    border-color: #06b6d4;
}
.airtable-btn.accent {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}
.airtable-btn.accent:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: #f59e0b;
}

.link-span {
    color: #a5b4fc;
    text-decoration: underline;
    transition: var(--transition-smooth);
}
.link-span:hover {
    color: #fff;
}

/* Range calculator widget styling */
.mini-calc-widget {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
}
.mini-calc-widget h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.calc-field {
    margin-bottom: 12px;
}
.calc-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}
.calc-field input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #1f293d;
    border-radius: 4px;
    outline: none;
    margin-bottom: 4px;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-software);
    cursor: pointer;
    transition: transform 0.1s ease;
}
#widgets-software .calc-field input[type="range"]::-webkit-slider-thumb { background: var(--color-software); }
#widgets-youtube .calc-field input[type="range"]::-webkit-slider-thumb { background: var(--color-youtube); }
#widgets-crypto .calc-field input[type="range"]::-webkit-slider-thumb { background: var(--color-crypto); }
#widgets-stock .calc-field input[type="range"]::-webkit-slider-thumb { background: var(--color-stock); }

.calc-field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.slider-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    text-align: right;
}
.calc-result {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.calc-result span {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}
.calc-result strong {
    font-size: 1.05rem;
    font-weight: 800;
}
#widgets-software .calc-result strong { color: var(--color-software); }
#widgets-youtube .calc-result strong { color: var(--color-youtube); }
#widgets-crypto .calc-result strong { color: var(--color-crypto); }
#widgets-stock .calc-result strong { color: var(--color-stock); }

/* Footer styling */
.app-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    background: rgba(7, 10, 19, 0.6);
}
.footer-container {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.footer-container p {
    margin-bottom: 4px;
}
.disclaimer {
    max-width: 700px;
    margin: 8px auto 0 auto;
    font-size: 0.68rem;
    line-height: 1.4;
}

/* ==========================================
   Responsive Layout (Mobile & Tablet)
   ========================================== */

@media (max-width: 992px) {
    .app-layout {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 16px;
        height: auto;
    }
    .app-container {
        margin-left: 0;
        width: 100%;
        padding: 20px 16px;
    }
    .dashboard-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 20px;
    }
    .bar-right {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .checklist-card {
        padding: 16px 0;
    }
}

@media (max-width: 576px) {
    .bar-right {
        grid-template-columns: 1fr;
    }
    .resource-links-grid {
        grid-template-columns: 1fr;
    }
    .airtable-grid {
        flex-direction: column;
    }
    .airtable-btn {
        width: 100%;
    }
}
