/* Oyun Yapıcı - Kendi Oyununu Oluştur */

.main-oyun-yapici {
    max-width: 1200px;
}

.maker-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.maker-tab {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.maker-tab:hover {
    background: #eef2ff;
}

.maker-tab.active {
    background: var(--primary);
    color: white;
}

.oyun-yapici-layout {
    display: grid;
    grid-template-columns: 200px 1fr 420px;
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 1000px) {
    .oyun-yapici-layout {
        grid-template-columns: 1fr;
    }
}

/* Blok Paleti */
.block-palette {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.block-palette h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.palette-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.block-templates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.block-template {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    cursor: grab;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.block-template:hover {
    background: #eef2ff;
    transform: scale(1.02);
}

.block-template:active {
    cursor: grabbing;
}

.block-template[data-type="kus"] { border-color: #10b981; background: #ecfdf5; }
.block-template[data-type="hedef"] { border-color: #f59e0b; background: #fffbeb; }
.block-template[data-type="engel"] { border-color: #92400e; background: #fef3c7; }
.block-template[data-type="baslat"] { border-color: #6366f1; background: #eef2ff; }

.block-emoji {
    font-size: 1.2rem;
}

.palette-info {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.palette-info p {
    margin: 0.25rem 0;
}

/* Program Alanı */
.program-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.program-area h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.program-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.program-container {
    min-height: 120px;
    padding: 1rem;
    background: #f8fafc;
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.program-container.drag-over {
    background: #eef2ff;
    border-color: var(--primary);
}

.program-placeholder {
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: center;
}

.program-placeholder.hidden {
    display: none;
}

.program-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    margin: 0.25rem 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: grab;
}

.program-block[data-type="kus"] { background: #d1fae5; border: 2px solid #10b981; }
.program-block[data-type="hedef"] { background: #fef3c7; border: 2px solid #f59e0b; }
.program-block[data-type="engel"] { background: #fef3c7; border: 2px solid #92400e; }
.program-block[data-type="baslat"] { background: #e0e7ff; border: 2px solid #6366f1; }

.program-block .block-remove {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
}

.program-block .block-remove:hover {
    opacity: 1;
}

.program-actions {
    display: flex;
    gap: 0.5rem;
}

.save-load-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.saved-games-select {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: white;
    min-width: 140px;
    cursor: pointer;
}

.btn-save, .btn-load {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save:hover, .btn-load:hover {
    background: #eef2ff;
}

.btn-delete-save {
    font-size: 1rem;
    padding: 0.35rem 0.5rem;
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-save:hover {
    background: #fecaca;
}

.btn-run {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-run:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-clear {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    background: #f87171;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #dc2626;
}

.btn-example {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-example:hover {
    background: #d97706;
}

/* Oyun Alanı */
.game-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.game-area h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.game-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.game-canvas-wrap {
    position: relative;
    background: linear-gradient(180deg, #87ceeb 0%, #98d8a0 60%, #c4a574 100%);
    border-radius: 12px;
    padding: 8px;
    border: 3px solid #5c4033;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

#game-canvas {
    display: block;
    border-radius: 8px;
    cursor: crosshair;
}

.slingshot-guide {
    display: none;
    position: absolute;
    pointer-events: none;
    border: 2px dashed rgba(255,255,255,0.8);
    border-radius: 50%;
}

.game-feedback {
    min-height: 36px;
    margin-top: 0.75rem;
    padding: 0.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.game-feedback.success {
    background: #d1fae5;
    color: #065f46;
}

.game-feedback.error {
    background: #fee2e2;
    color: #991b1b;
}

.game-feedback:empty {
    display: none;
}

.game-stats {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}
