/* ==========================
   Global Styles
========================== */
body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #f4f4f4;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

#cy {
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* ==========================
   Panels (Status & Creator)
========================== */
.panel {
    position: fixed;
    left: 10px;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 180px;
    font-size: 14px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#status-panel {
    top: 10px;
}

#creator-panel {
    top: 300px;
}

.panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* ==========================
   Creator Panel Buttons
========================== */
.creator-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.creator-buttons button {
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    background-color: #0077cc;
    color: white;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 100%;
}

.creator-buttons button:hover {
    background-color: #005fa3;
}

.creator-buttons button.active {
    background-color: #d32f2f;
}

/* ==========================
   ASCII Tree Display
========================== */
#tree-panel {
    white-space: pre;
    font-family: monospace;
    font-size: 12px;
}

/* ==========================
   Slider (Skill / Intro)
========================== */
.slider {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.slider.visible {
    transform: translateX(0);
    opacity: 1;
}

.slider header {
    padding: 1em;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.close-slider {
    font-size: 1.2rem;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
}

.slider .content {
    padding: 1em;
    overflow-y: auto;
    flex-grow: 1;
}

.slider .content p,
.slider .content ul {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
    margin: 0.8em 0;
}

.slider .content a {
    color: #0077cc;
    text-decoration: none;
}

.slider .content a:hover {
    text-decoration: underline;
}

/* ==========================
   Slider Status Badge
========================== */
.status-badge {
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
}

.status-achieved {
    background-color: #a5d6a7;
    color: #2e7d32;
}

.status-unlocked {
    background-color: #fff59d;
    color: #f57f17;
}

.status-locked {
    background-color: #e0e0e0;
    color: #555;
}

/* ==========================
   Tooltip
========================== */
#tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    padding: 6px;
    font-size: 0.8rem;
    color: #333;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 999;
    display: none;
    max-width: 200px;
}

/* ==========================
   Graph Controls & Mini Map
========================== */
#graph-controls-container {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    width: 200px;
}

#cytoscape-navigator {
    width: 100%;
    height: 250px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
    position: relative;
    pointer-events: auto;
    z-index: 10000;
}

#cytoscape-navigator canvas {
    max-width: 100%;
    max-height: 100%;
    margin: 5px;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
}

.graph-controls {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.graph-controls button {
    flex: 1;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
}

.graph-controls button:hover {
    background-color: #e0e0e0;
}

/* ==========================
   Node Highlighting
========================== */
.current {
    border-width: 4px;
    border-color: blue;
}

/* =========================================
   NEW / UPDATED ACCORDION STYLES
   (Notion-like, more professional look)
========================================= */
details.task-details {
    margin: 1em 0;
    padding: 0.5em;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, background-color 0.2s;
}

details.task-details:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

details.task-details summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    margin: 0;
    padding: 0.8em 2.2em 0.8em 2.5em;
    position: relative;
    outline: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

details.task-details summary:hover {
    background-color: #f7f7f7;
}

details.task-details summary::before {
    content: "▶";
    position: absolute;
    left: 0.8em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
    color: #666;
    transition: transform 0.3s, content 0.3s;
}

details.task-details[open] summary::before {
    content: "▼";
    transform: translateY(-50%);
}

details.task-details .accordion-content {
    margin: 0.5em 0;
    margin-left: 2em;
    border-left: 2px solid #f0f0f0;
    padding-left: 1em;
    font-size: 0.95rem;
    color: #444;
}

.checklist {
    list-style: none;
    padding-left: 0;
    margin: 0.6em 0;
}

.checklist li {
    margin: 0.3em 0;
    display: flex;
    align-items: center;
}

.checklist input[type="checkbox"] {
    margin-right: 0.6em;
    transform: scale(1.2);
    cursor: pointer;
}

.checklist label {
    font-size: 0.95rem;
    color: #444;
}

details.task-details summary .progress-count {
    margin-left: 0.5em;
    background-color: #e6f4ea;
    color: #2e7d32;
    font-size: 0.85rem;
    padding: 0.2em 0.6em;
    border-radius: 10px;
}
