:root {
    --bg-color: #ffffff;
    --header-bg: #fff;
    --toolbox-bg: #fff;
    --text-color: #333;
    --border-color: #ccc;
    --primary-color: #008CBA;
    --accent-color: #FF9800;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f0f0f0;
}

/* Header */
header {
    height: 50px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.logo span {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.project-search {
    position: relative;
    margin-right: 20px;
}

.project-search input {
    padding: 5px 10px 5px 30px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    width: 250px;
    background: rgba(255, 255, 255, 0.9);
}

.project-search i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
}

button {
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    font-weight: bold;
}

.primary-btn:hover {
    background: #e68900;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.run-btn {
    background: #4CAF50;
    /* Green for Run */
}

.run-btn:hover {
    background: #43a047;
}

.icon-btn {
    padding: 4px;
    background: transparent;
    color: #aaa;
}

.icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Layout */
main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Left Sidebar: Projects */
#projectSidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 10px;
    background: #f1f1f1;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
}

.project-list {
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
}

.project-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.1s;
}

.project-item:hover {
    background: #f9f9f9;
}

.project-item.active {
    background: #e3f2fd;
    border-left: 3px solid var(--primary-color);
}

.project-item .p-id {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 5px;
}

.project-item .p-title {
    color: #333;
}

/* Center Panel: Workspace + Console */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#blocklyDiv {
    flex: 1;
    border-right: 1px solid var(--border-color);
}

#consoleArea {
    height: 180px;
    background: #222;
    color: #0f0;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #444;
}

.console-header {
    background: #333;
    padding: 5px 10px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ddd;
}

#consoleOutput {
    flex: 1;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.log-line {
    margin-bottom: 2px;
}

.log-line.system {
    color: #888;
}

.log-line.error {
    color: #ff5252;
}

.log-line.output {
    color: #00e676;
}

/* Right Panel: Tabs */
#rightPanel {
    width: 350px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #f1f1f1;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    color: #666;
    border-radius: 0;
    justify-content: center;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    flex: 1;
    display: none;
    overflow-y: auto;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

/* Task Details */
#task-details h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.badge {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
    margin-right: 5px;
}

#task-instructions {
    line-height: 1.5;
}

/* Python Code Display */
#codeDisplay {
    margin: 0;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #333;
}