/* =========================================
   1. GLOBAL & LAYOUT STYLES
   ========================================= */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e; /* Dark VS Code background */
    color: #d4d4d4;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100%;
}

/* =========================================
   2. SIDEBAR NAVIGATION
   ========================================= */
.sidebar {
    width: 260px;
    background-color: #252526;
    border-right: 1px solid #333;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1.1rem;
    color: #fff;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 25px;
    border-bottom: 1px solid #3e3e42;
    padding-bottom: 10px;
}

.file-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #ccc;
    padding: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: background 0.2s;
}

.file-btn:hover {
    background-color: #2a2d2e;
    color: #fff;
}

.file-btn.active {
    background-color: #37373d;
    color: #fff;
    border-left: 4px solid #007acc; /* Blue highlight */
    font-weight: bold;
}

/* =========================================
   3. MAIN CONTENT AREA
   ========================================= */
.main-viewer {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: #1e1e1e;
}

.content-block {
    display: none; /* Hidden by default */
}

.content-block.active {
    display: block; /* Visible when selected */
    animation: fadeIn 0.3s ease-in-out;
}

h3 {
    color: #9cdcfe;
    margin-top: 0;
    font-size: 1.5rem;
}

.description {
    color: #888;
    margin-bottom: 20px;
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   4. CODE & TEXT STYLES
   ========================================= */
pre {
    background-color: #1e1e1e;
    padding: 20px;
    border: 1px solid #444;
    border-radius: 5px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

code {
    font-family: 'Consolas', 'Courier New', monospace;
    color: #ce9178;
    font-size: 1rem;
}

/* For Essays (Paper Look) */
.text-content {
    background-color: #f0f0f0; 
    color: #222; 
    padding: 40px;
    border-radius: 5px;
    line-height: 1.6;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.text-content h4 {
    color: #000;
    margin-top: 0;
}

img {
    max-width: 100%;
    border: 1px solid #ccc;
    margin-top: 10px;
}

/* =========================================
   5. ROZETTACODE LANGUAGE TABS
   ========================================= */
.lang-tabs {
    display: flex;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
    gap: 5px;
}

.lang-btn {
    background-color: #252526;
    color: #888;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 5px 5px 0 0;
    transition: all 0.2s;
}

.lang-btn:hover {
    background-color: #333;
    color: #fff;
}

.lang-btn.active {
    background-color: #1e1e1e;
    color: #4ec9b0; /* Teal highlight for language tabs */
    border: 1px solid #333;
    border-bottom: 2px solid #1e1e1e; 
    margin-bottom: -2px;
    font-weight: bold;
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.lang-content h4 {
    margin-top: 0;
    color: #e5e5e5;
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
