/* VisionMentoring Premium Design System */
/* Mobile-First Architecture */

:root {
    /* Color Palette */
    --primary: #0f172a;
    /* Deep Blue */
    --primary-light: #1e293b;
    --accent: #ca8a04;
    /* Gold */
    --accent-glow: rgba(202, 138, 4, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #020617 100%);

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(148, 163, 184, 0.1);
    --blur: 12px;

    /* Spacing */
    --p-sm: 0.5rem;
    --p-md: 1rem;
    --p-lg: 1.5rem;

    /* Transitions */
    --trans-fast: 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', 'Roboto', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* App-like feel */
}

/* --- Layout Components --- */

.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    flex-direction: column;
    /* Mobile Default: Stacked */
}

/* Header */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    border-bottom: var(--glass-border);
    padding: var(--p-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand span {
    color: var(--accent);
}

/* Main Content Area */
.main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* View Switcher (Mobile Only) */
.mobile-tabs {
    display: flex;
    background: var(--primary-light);
    border-top: var(--glass-border);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans-fast);
}

.tab-btn.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Desktop Tabs (Visible on larger screens) */
@media (min-width: 768px) {
    .mobile-tabs {
        display: none;
    }

    .desktop-tabs {
        display: flex !important;
        gap: 2rem;
    }

    .nav-tab {
        background: none;
        border: none;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 1rem;
        padding: 1rem 0;
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: var(--trans-fast);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-tab:hover {
        color: var(--text-main);
    }

    .nav-tab.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }

    /* Override Split View - Enforce Tabbed View */
    .main-view {
        flex-direction: column;
        /* Stacked but hidden */
    }

    .panel {
        display: none;
        /* Hide all by default */
        width: 100%;
        height: 100%;
        border-right: none;
        /* Remove split border */
    }

    .panel.active {
        display: flex;
        /* Show only active */
    }
}

/* --- Guide Reader Styles --- */
.guide-reader {
    font-size: 1.1rem;
    line-height: 1.8;
}

.guide-title {
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content-block {
    margin-bottom: 1.5rem;
}

.interactive-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.interactive-card .icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.guide-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 1rem;
    min-height: 80px;
    font-family: inherit;
}

.nav-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #475569;
}

.save-btn {
    margin-top: 0.8rem;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* --- Utilities --- */

/* --- Panels --- */

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Mobile Toggle Logic (Hidden by default unless active) */
@media (max-width: 1023px) {
    .panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateX(100%);
        /* Slide out */
        z-index: 1;
    }

    .panel.active {
        transform: translateX(0);
        z-index: 2;
    }
}

/* Panel Specifics */
.chat-panel {
    border-right: var(--glass-border);
}

.doc-panel {
    background: #ffffff;
    /* Paper look for document */
    color: #1e293b;
    /* Dark text on white paper */
}

/* Chat Interface */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--p-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.message.user {
    align-self: flex-end;
    background: var(--accent);
    color: #000;
    border-bottom-right-radius: 2px;
}

.message.mentor {
    align-self: flex-start;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: var(--p-md);
    background: var(--glass-bg);
    border-top: var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 0.8rem 1rem;
    color: white;
    outline: none;
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Document Interface */
.doc-header {
    padding: var(--p-md);
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    font-family: 'Times New Roman', serif;
    /* Classic doc feel */
    line-height: 1.8;
}

.doc-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.doc-content p {
    margin-bottom: 1rem;
}