/* Robot Çizim - Logo/Scratch tarzı */

.main-robot-cizim {
    max-width: 950px;
}

.robot-cizim-layout {
    display: grid;
    grid-template-columns: 180px 1fr 400px;
    gap: 1rem;
    padding: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .robot-cizim-layout {
        grid-template-columns: 1fr;
    }
}

.robot-cizim-layout.mode-elle {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
}

.blocks-panel, .program-tray {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.blocks-panel { border: 3px solid #6366f1; }
.program-tray { border: 3px solid #10b981; }

.blocks-panel h3, .program-tray h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.block-tray { display: flex; flex-direction: column; gap: 0.5rem; }
.block-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    cursor: grab;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid;
    transition: all 0.2s;
}
.block-item:hover { transform: scale(1.02); }
.block-item[data-cmd="ileri"] { border-color: #10b981; background: #d1fae5; }
.block-item[data-cmd="sola"] { border-color: #6366f1; background: #e0e7ff; }
.block-item[data-cmd="saga"] { border-color: #8b5cf6; background: #ede9fe; }
.block-item[data-cmd="tekrarla"] { border-color: #ec4899; background: #fce7f3; }

.repeat-num {
    width: 40px;
    padding: 0.2rem;
    border: 2px solid #ec4899;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
}

.program-slots {
    min-height: 100px;
    padding: 1rem;
    background: #ecfdf5;
    border: 3px dashed #10b981;
    border-radius: 16px;
    margin-bottom: 1rem;
}
.program-slots.drag-over { background: #d1fae5; }
.slot-placeholder { color: #6b7280; font-size: 0.9rem; text-align: center; }
.slot-placeholder.hidden { display: none; }

.program-block {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    margin: 0.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: grab;
    border: 2px solid;
}
.program-block[data-cmd="ileri"] { background: #a7f3d0; border-color: #10b981; }
.program-block[data-cmd="sola"] { background: #c7d2fe; border-color: #6366f1; }
.program-block[data-cmd="saga"] { background: #ddd6fe; border-color: #8b5cf6; }
.program-block[data-cmd="tekrarla"] { background: #fbcfe8; border-color: #ec4899; }
.program-block .block-remove {
    margin-left: 0.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.7;
}
.program-block .block-remove:hover { opacity: 1; }

.tray-actions { display: flex; gap: 0.5rem; }
.btn-play, .btn-reset {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
}
.btn-play { background: #10b981; color: white; }
.btn-play:hover { background: #059669; transform: scale(1.05); }
.btn-reset { background: #f59e0b; color: white; }

.draw-scene {
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 1rem;
    border: 3px solid #0ea5e9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.canvas-wrap {
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 8px;
    box-shadow: inset 0 0 0 2px #e5e7eb;
    display: inline-block;
    touch-action: none;
}

#draw-canvas, #pixel-canvas {
    display: block;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
}

.pixel-canvas-wrap {
    background: #0f0f1a;
}

.pixel-canvas-wrap #draw-canvas {
    display: none !important;
}

.pixel-canvas-wrap #pixel-canvas {
    display: block !important;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
}

.mode-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.mode-tab {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 2px solid #6366f1;
    background: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.mode-tab:hover { background: #e0e7ff; }
.mode-tab.active { background: #6366f1; color: white; }

.draw-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.tool-btn {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 2px solid #f59e0b;
    background: white;
    font-weight: 700;
    cursor: pointer;
}
.tool-btn:hover { background: #fef3c7; }
.pixel-label { font-weight: 700; font-size: 0.9rem; }
.pixel-palette {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.pixel-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid #374151;
    cursor: pointer;
    transition: transform 0.15s;
}
.pixel-color:hover { transform: scale(1.15); }
.pixel-color.active {
    border-color: #1f2937;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1f2937;
}
/* Pixel art canvas - keskin piksel görünümü */
#pixel-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
.pixel-canvas-wrap #pixel-canvas {
    display: block !important;
}
.pixel-canvas-wrap #draw-canvas {
    display: none !important;
}

.level-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.level-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #6366f1;
    background: white;
    color: #6366f1;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.level-dot:hover { background: #e0e7ff; transform: scale(1.1); }
.level-dot.active { background: #6366f1; color: white; }
.level-dot.completed { background: #10b981; border-color: #059669; color: white; }

.game-message {
    min-height: 40px;
    margin-top: 0.75rem;
    padding: 0.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}
.game-message.success { background: #d1fae5; color: #065f46; }
.game-message.error { background: #fee2e2; color: #991b1b; }
.game-message:empty { display: none; }
