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

body {
    background-color: #1a1a2e;
    color: #f0f0f0;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #162447;
    border-bottom: 1px solid #0f3460;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-title {
    font-size: 1.5rem;
    color: #64dfdf;
}

.btn-icon {
    background: none;
    border: none;
    color: #64dfdf;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background-color: rgba(100, 223, 223, 0.1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: #1f4068;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.file-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-small {
    padding: 8px 12px;
    background-color: #0f3460;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-tree {
    margin-top: 10px;
}

.snippets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.snippet-item {
    padding: 10px;
    background-color: #0f3460;
    border: none;
    border-radius: 5px;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.snippet-item:hover {
    background-color: #162447;
}

.history-section {
    margin-top: 20px;
}

.slider {
    width: 100%;
    margin-top: 10px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
}

.settings-section {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #1a1a2e;
    border-bottom: 1px solid #0f3460;
}

.file-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

.tab {
    padding: 8px 15px;
    background-color: #0f3460;
    color: white;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    white-space: nowrap;
}

.tab.active {
    background-color: #1f4068;
}

.btn-run {
    padding: 10px 20px;
    background-color: #00b894;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.editor-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #162447;
    border-bottom: 1px solid #0f3460;
}

#language-select {
    padding: 8px 12px;
    background-color: #0f3460;
    color: white;
    border: 1px solid #64dfdf;
    border-radius: 5px;
}

.code-editor {
    flex: 1;
    overflow: hidden;
}

.CodeMirror {
    height: 100% !important;
    font-size: 16px;
    line-height: 1.5;
}

/* Symbol toolbar */
.symbol-toolbar {
    background-color: #1a1a2e;
    border-top: 1px solid #0f3460;
    padding: 10px;
    display: none; /* Awalnya tersembunyi, akan muncul saat fokus di editor */
}

.symbol-toolbar.active {
    display: block;
}

.symbol-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
}

.symbol-btn {
    padding: 12px;
    background-color: #0f3460;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.symbol-btn:hover {
    background-color: #1f4068;
}

.arrow-btn {
    font-size: 0.9rem;
    min-width: 45px;
}

/* Console panel */
.console-panel {
    height: 200px;
    background-color: #0d1117;
    border-top: 2px solid #64dfdf;
    display: flex;
    flex-direction: column;
    transition: height 0.3s;
}

.console-panel.collapsed {
    height: 40px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #162447;
    cursor: pointer;
}

.console-output {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
}

.console-message {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 3px;
}

.console-message.info {
    color: #64dfdf;
}

.console-message.error {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
}

.console-message.warn {
    color: #feca57;
}

.console-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #333;
}

#console-input {
    flex: 1;
    padding: 10px;
    background-color: #1a1a2e;
    border: 1px solid #64dfdf;
    border-radius: 5px 0 0 5px;
    color: white;
}

#console-execute {
    padding: 10px 15px;
    background-color: #64dfdf;
    color: #1a1a2e;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: bold;
}

/* Floating buttons */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #00b894;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.fab:hover {
    transform: scale(1.1);
}

/* Notifikasi */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #00b894;
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transform: translateX(150%);
    transition: transform 0.3s;
}

.notification.show {
    transform: translateX(0);
}

/* Responsif */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.2rem;
    }
    .btn-icon {
        font-size: 1rem;
        padding: 6px;
    }
    .symbol-btn {
        min-width: 45px;
        padding: 10px;
        font-size: 1rem;
    }
    .sidebar {
        width: 85%;
        left: -85%;
    }
}

/* Zen mode */
.zen-mode .app-header,
.zen-mode .editor-toolbar,
.zen-mode .editor-header,
.zen-mode .symbol-toolbar,
.zen-mode .floating-buttons {
    display: none;
}

.zen-mode .editor-container {
    height: 100vh;
}
