* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: grid;
    grid-template-rows: 60px 1fr 80px;
    height: 100vh;
    background-color: #1e1e1e;
    color: #ffffff;
    overflow: hidden;
}

/* 1. Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
}

.project-name input {
    background: transparent;
    border: 1px solid transparent;
    color: white;
    font-size: 1.2rem;
    padding: 5px;
    transition: border 0.3s;
}

.project-name input:focus {
    border-bottom: 1px solid #007bff;
    outline: none;
}

.action-btns button {
    padding: 8px 16px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-draft { background: #555; color: white; }
.btn-draft:hover { background: #666; }
.btn-export { background: #007bff; color: white; }
.btn-export:hover { background: #0056b3; }

/* Main Workspace Container */
main {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    overflow: hidden;
}

/* 2. Sidebar Kiri (Langkah) */
.sidebar-left {
    background-color: #252526;
    border-right: 1px solid #444;
    padding: 15px;
    overflow-y: auto;
}

.step-card {
    background-color: #333;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #555;
    cursor: grab;
    transition: border 0.3s;
}

.step-card.active {
    border-color: #007bff;
}

.step-card input {
    width: 100%;
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 8px;
    margin-top: 8px;
    border-radius: 4px;
}

.btn-duplicate {
    width: 100%;
    padding: 10px;
    background: #444;
    color: white;
    border: 1px dashed #777;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}
.btn-duplicate:hover { background: #555; }

/* 3. Area Tengah (Canvas) */
.canvas-area {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    padding: 20px;
    position: relative;
}

.math-stage {
    width: 800px;
    height: 450px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

/* Interaksi Token Matematika */
.math-token {
    margin: 0 5px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
    padding: 0 5px;
    border-radius: 4px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: scale(0.5) translateY(20px);
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.math-token:hover {
    background-color: #e0e0e0;
}

.selected-token {
    background-color: #ffeb3b !important;
    color: #d32f2f;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 4. Panel Kanan (Pengaturan) */
.sidebar-right {
    background-color: #252526;
    border-left: 1px solid #444;
    padding: 15px;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.9rem;
}

.settings-group select, .settings-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 4px;
}

/* 5. Panel Bawah (Timeline) */
footer {
    background-color: #2d2d2d;
    border-top: 1px solid #444;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.player-controls button {
    background: #444;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    transition: background 0.3s;
}
.player-controls button:hover { background: #555; }

.timeline-track {
    flex-grow: 1;
    height: 30px;
    background: #1e1e1e;
    border-radius: 4px;
    position: relative;
    border: 1px solid #444;
}
