/* Shared stylesheet for Kotlin for Java Developers tutorial chapters */
:root { --kotlin: #7F52FF; --kotlin-dark: #5B3DD9; --kotlin-light: rgba(127,82,255,0.08); --java: #F89820; }

/* Layout */
.tutorial-layout { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: calc(100vh - 72px); }
@media (max-width: 991px) { .tutorial-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.tutorial-sidebar { background: #f8fafc; border-right: 1px solid #e2e8f0; padding: 28px 0; position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; }
@media (max-width: 991px) { .tutorial-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid #e2e8f0; padding: 16px 0; } }
.sidebar-title { font-size: 0.72rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 20px 12px; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 10px 20px; font-size: 0.85rem; font-weight: 500; color: #64748b; text-decoration: none; border-left: 3px solid transparent; transition: all 0.15s; }
.sidebar-link:hover { color: var(--kotlin); background: var(--kotlin-light); text-decoration: none; }
.sidebar-link.active { color: var(--kotlin); font-weight: 700; border-left-color: var(--kotlin); background: var(--kotlin-light); }
.sidebar-link.done { color: #16a34a; }
.sidebar-ch-num { width: 24px; height: 24px; border-radius: 6px; background: #e2e8f0; color: #64748b; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; flex-shrink: 0; }
.sidebar-link.active .sidebar-ch-num { background: var(--kotlin); color: white; }
.sidebar-link.done .sidebar-ch-num { background: #dcfce7; color: #16a34a; }

/* Content */
.tutorial-content { padding: 40px 48px; max-width: 900px; }
@media (max-width: 767px) { .tutorial-content { padding: 24px 16px; } }

/* Code comparison */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 767px) { .compare-grid { grid-template-columns: 1fr; } }
.code-panel { border-radius: 12px; overflow: hidden; }
.code-panel-header { padding: 10px 16px; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.java-header { background: #1a1a1a; color: #F89820; }
.kotlin-header { background: #1a1a1a; color: #c4b5fd; }
.code-panel pre[class*="language-"] { margin: 0; border-radius: 0; font-size: 0.82rem; }

/* Callout boxes */
.callout { border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.callout-kotlin { background: var(--kotlin-light); border-left: 4px solid var(--kotlin); }
.callout-tip { background: #f0fdf4; border-left: 4px solid #22c55e; }
.callout-warning { background: #fff7ed; border-left: 4px solid #f97316; }
.callout-java { background: rgba(248,152,32,0.08); border-left: 4px solid var(--java); }
.callout-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 4px; }

/* Chapter navigation */
.chapter-nav { border-top: 1px solid #e2e8f0; margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nav-btn { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 12px; border: 2px solid #e2e8f0; text-decoration: none; color: #1e293b; font-weight: 600; font-size: 0.88rem; transition: all 0.2s; }
.nav-btn:hover { border-color: var(--kotlin); color: var(--kotlin); text-decoration: none; }
.nav-btn-next { background: var(--kotlin); border-color: var(--kotlin); color: white; }
.nav-btn-next:hover { background: var(--kotlin-dark); border-color: var(--kotlin-dark); color: white; }

/* Comparison table */
.compare-table th { font-weight: 700; font-size: 0.82rem; }
.compare-table .java-col { background: rgba(248,152,32,0.05); }
.compare-table .kotlin-col { background: var(--kotlin-light); }

/* Mark done button */
.done-btn { background: none; border: 2px solid #e2e8f0; border-radius: 50rem; padding: 8px 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; color: #64748b; }
.done-btn.marked { background: #dcfce7; border-color: #22c55e; color: #16a34a; }
.done-btn:hover:not(.marked) { border-color: #22c55e; color: #16a34a; }

/* Inline code */
code:not([class]) { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; color: var(--kotlin); font-family: 'JetBrains Mono', monospace; }

/* Key term highlight */
.key-term { display: inline-block; background: var(--kotlin-light); color: var(--kotlin); font-weight: 700; padding: 1px 8px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.9em; }

/* Operator comparison pill */
.op-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 50rem; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.85rem; }
.op-kotlin { background: var(--kotlin-light); color: var(--kotlin); }
.op-java { background: rgba(248,152,32,0.12); color: #b45309; }
