/* Hikaye Kodlama Sayfası */

.main-hikaye {
    max-width: 1200px;
}

.level-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.level-dot {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .level-dot {
    background: var(--card-bg);
}

.level-dot:hover {
    background: #e0e7ff;
    transform: scale(1.1);
}

.level-dot.active {
    background: var(--primary);
    color: white;
}

.level-dot.completed {
    background: var(--success);
    border-color: #059669;
    color: white;
}

.level-hint {
    margin-top: 0.5rem;
}

.level-hint .btn-hint {
    font-size: 1.25rem;
    padding: 0.4rem 0.6rem;
    background: #fef3c7;
    border: 2px solid var(--secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .level-hint .btn-hint {
    background: rgba(251, 191, 36, 0.2);
}

.hikaye-layout {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 950px) {
    .hikaye-layout {
        grid-template-columns: 1fr;
    }
}

/* Blok Paleti */
.block-palette {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

[data-theme="dark"] .block-palette {
    background: rgba(49, 46, 129, 0.9);
}

.block-palette h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.block-templates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.block-template {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    cursor: grab;
    transition: all 0.2s;
}

[data-theme="dark"] .block-template {
    background: var(--card-bg);
}

.block-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.block-template.metin .metin-input {
    flex: 1;
    min-width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
}

.block-conditional .block-slot {
    width: 100%;
    min-height: 36px;
    margin-top: 0.4rem;
    padding: 0.4rem;
    background: rgba(99, 102, 241, 0.08);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Program Alanı */
.program-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .program-area {
    background: rgba(49, 46, 129, 0.9);
}

.program-container {
    min-height: 120px;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    margin-bottom: 1rem;
}

[data-theme="dark"] .program-container {
    background: rgba(30, 27, 75, 0.5);
    border-color: var(--card-border);
}

.program-placeholder {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.program-placeholder.hidden {
    display: none;
}

.program-container .program-block {
    margin-bottom: 0.5rem;
}

.program-block .block-slot {
    margin-left: 1.5rem;
    margin-top: 0.4rem;
    padding: 0.5rem;
    min-height: 32px;
    background: rgba(99, 102, 241, 0.06);
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 8px;
}

.program-block .block-slot.slot-hint {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Program blokları - kopyalanan */
.program-block {
    display: block;
    padding: 0.6rem 0.8rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    cursor: grab;
}

[data-theme="dark"] .program-block {
    background: var(--card-bg);
}

.program-block[data-type="eger"] {
    border-left: 4px solid #f59e0b;
}

.program-block[data-type="degilse"] {
    border-left: 4px solid #10b981;
}

.program-block .metin-input {
    padding: 0.2rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 100px;
}

/* Hikaye Alanı */
.story-area {
    background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

[data-theme="dark"] .story-area {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, var(--card-bg) 100%);
}

.story-area h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.story-intro {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1rem;
}

.story-choices {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.story-choices button {
    flex: 1;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-choices button:hover {
    background: #eef2ff;
    transform: scale(1.02);
}

.story-choices button.chosen {
    background: var(--primary);
    color: white;
}

.story-result {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    min-height: 50px;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .story-result {
    background: rgba(0, 0, 0, 0.2);
}

.story-feedback {
    font-size: 0.95rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid transparent;
}

.story-feedback.success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

[data-theme="dark"] .story-feedback.success {
    background: rgba(16, 185, 129, 0.2);
}

.story-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

[data-theme="dark"] .story-feedback.error {
    background: rgba(239, 68, 68, 0.2);
}

.block-count {
    font-size: 0.85rem;
    color: var(--text-light);
}
