﻿:root {
    --primary: #4a90e2;
    --secondary: #50e3c2;
    --background-body: #eef2f6;
    --background-light: #f5f7fa;
    --background-dark: #2f3640;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-dark: #333d47;
    --text-light: #e0e6ed; /* Kod metni için açık renk */
    --border-light: #e0e6f0;
    --border-dark: #4d5663;
    --code-highlight: #ffcc00;
    --error: #e74c3c;
    --success: #2ecc71;
    --warning: #f1c40f;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-body);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- 3 Sütunlu Ana Yapı --- */
#main-container {
    display: flex;
    height: 100%;
    max-width: 100vw;
    overflow: hidden;
    border-top: 5px solid var(--primary);
}

/* KART BAZLI İÇERİK İÇİN YENİ STİL */
.content-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 1. Sütun: Kontrol ve Öğretme Alanı */
#prompt-area {
    flex: 0 0 28%; /* GÜNCELLENDİ: %28'e daraltıldı */
    padding: 20px;
    background-color: var(--background-light);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

#top-prompt-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Sol sütun içeriğini sarmalayan kart */
#prompt-area .content-card {
    flex-grow: 1;
    padding-bottom: 10px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

    #prompt-area .content-card h1,
    #prompt-area .content-card .step-info,
    #prompt-area .content-card p,
    #prompt-area .content-card #current-code-prompt-box {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    #prompt-area .content-card #current-code-prompt-box {
        background-color: var(--background-dark);
        color: var(--code-highlight);
        border: 1px solid var(--border-dark);
        box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 15px;
        margin: 15px 0;
    }

#bottom-input-area {
    flex-shrink: 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 15px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}


/* 2. Sütun: Kod Dizme Alanı */
#code-area-wrapper {
    flex: 0 0 28%; /* GÜNCELLENDİ: %28'e daraltıldı */
    background-color: var(--background-dark); /* Genel koyu alan */
    padding: 20px;
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    padding-bottom: 90px;
    position: relative;
}

    #code-area-wrapper h3 {
        font-family: 'Open Sans', sans-serif;
        color: var(--secondary);
        margin-bottom: 15px;
        text-align: center;
        border-bottom: 1px solid var(--border-dark);
        padding-bottom: 10px;
        font-size: 1.2em;
        flex-shrink: 0;
        text-transform: uppercase;
        letter-spacing: 1px;
        background-color: var(--background-dark); /* Başlık zemini siyah */
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        margin: 0 0 15px 0;
        padding: 10px 20px;
    }

/* KODUN GÖSTERİLDİĞİ ALANIN ARKA PLANI - SİYAH */
#script-display-container {
    background-color: #1e1e1e; /* Tamamen Koyu (Siyah) Kod Arka Planı */
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Satır Numaraları */
.line-numbers {
    position: absolute;
    left: 25px;
    top: 105px;
    bottom: 110px;
    width: 30px;
    color: #999; /* Satır numaraları açık gri */
    font-size: 0.85em;
    text-align: right;
    padding-right: 8px;
    overflow: hidden;
    user-select: none;
    border-right: 1px solid var(--border-dark);
    padding-top: 15px;
    z-index: 1;
    font-family: 'JetBrains Mono', monospace;
}

    .line-numbers div {
        padding: 2px 0;
        line-height: 1.5;
    }

#script-display {
    position: relative;
    padding-left: 40px;
    min-height: 100%;
}

/* 3. Sütun: Simülasyon/Oyun Alanı */
#simulation-area {
    flex: 1; /* Kalan tüm alanı kaplar (Şimdi %44'e genişledi) */
    padding: 20px;
    background-color: var(--background-body);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    /* Simülasyon içeriğini sarmalayan kart */
    #simulation-area .content-card {
        flex-grow: 1;
        width: 100%;
        max-width: 600px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

/* --- Python Başlık Stili --- */
.python-header {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.4em;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
    font-weight: 700;
}

    .python-header i {
        color: var(--primary);
        margin-right: 10px;
    }

/* --- DROPDOWN Stilleri (Yeni) --- */
.dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.dropdown-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary);
    color: white;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.2s;
}

    .dropdown-btn:hover {
        background-color: #3b7acb;
        transform: none;
    }

.dropdown-arrow {
    margin-left: 10px;
    transition: transform 0.3s;
}

.dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, border 0.3s;
    margin-top: 5px;
    list-style: none;
    padding: 0;
}

    .dropdown-menu.show {
        max-height: 400px;
        border: 1px solid var(--primary);
    }

    .dropdown-menu .game-option {
        padding: 10px 15px;
        cursor: pointer;
        border-bottom: 1px solid var(--border-light);
        transition: background-color 0.2s, color 0.2s;
        background-color: white;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
        display: flex;
        align-items: center;
        font-weight: 600;
    }

        .dropdown-menu .game-option:last-child {
            border-bottom: none;
            border-radius: 0 0 8px 8px;
        }

        .dropdown-menu .game-option:first-child {
            border-radius: 8px 8px 0 0;
        }

        .dropdown-menu .game-option:hover {
            background-color: var(--background-light);
            color: var(--primary);
            transform: none;
            box-shadow: none;
        }

        .dropdown-menu .game-option.active {
            background-color: var(--primary);
            color: white;
            font-weight: 700;
        }

            .dropdown-menu .game-option.active i {
                color: white;
            }

        /* Oyun Seçeneklerindeki ikonlar */
        .dropdown-menu .game-option i {
            margin-right: 12px;
            color: var(--primary);
            font-size: 1.1em;
            transition: color 0.2s;
        }


/* --- Prompt Alanı Stilleri (Geri Kalanı) --- */
.step-info {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.05em;
    text-align: center;
    padding: 5px 0;
    background-color: rgba(234, 242, 251, 0.7);
    border-radius: 5px;
}

#code-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1em;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.2s;
    background-color: #fff;
}

    #code-input:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    }

#submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #submit-btn i {
        margin-right: 8px;
    }

    #submit-btn:hover {
        background-color: #3b7acb;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

#error-message {
    color: var(--error);
    font-weight: bold;
    margin-top: 10px;
    min-height: 20px;
    text-align: center;
}

/* --- Kod Dizme Alanı Stilleri --- */
.code-line {
    white-space: pre;
    color: var(--text-light); /* Kod metni beyaz */
    padding: 2px 0px;
    margin-bottom: 2px;
    font-size: 0.9em;
    line-height: 1.5;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
}

/* --- Simülasyon Alanı Stilleri --- */
#simulation-area h2 {
    font-family: 'Open Sans', sans-serif;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
    width: 100%;
}

.game-status {
    font-size: 1.2em;
    margin-bottom: 25px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* Oyun Arayüzleri */
.game-interface {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 450px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.game-button {
    padding: 12px 30px;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: var(--primary);
    color: white;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

    .game-button i {
        margin-right: 8px;
    }

    .game-button:hover {
        background-color: #3b7acb;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

/* Sonuç mesajları */
.result-message {
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    text-align: center;
    width: 100%;
    margin-top: 15px;
    font-size: 1.1em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-win {
    background-color: var(--success);
}

.result-lose {
    background-color: var(--error);
}

.result-draw {
    background-color: var(--warning);
    color: var(--text-dark);
}

#rps-choices .game-button {
    min-width: unset;
    width: 30%;
}

#word-display {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--primary);
}

#number-guess-input, #guess-input, #calculator-input {
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1em;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background-color: #fff;
}
