﻿/* CSS STİLLERİ */
body {
    font-family: 'Poppins', Arial, sans-serif;
    display: flex;
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: #f0f4f8;
    overflow: hidden;
}

#game-container {
    flex: 1;
    position: relative;
    background-color: #4b5563;
}

#stage-control {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    display: flex;
    gap: 15px;
    align-items: center;
}

    #stage-control button {
        background: #004c99;
        color: white;
        border: none;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        transition: background 0.2s;
    }

        #stage-control button:hover {
            background: #003a7a;
        }

        #stage-control button:disabled {
            background: #555;
            cursor: not-allowed;
        }

#ui-container {
    width: 380px;
    background-color: #ffffff;
    padding: 25px;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 5px solid #004c99;
}

h2 {
    color: #004c99;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.command-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

/* Draggable Komut Butonu Stili */
.draggable-command {
    padding: 15px 5px;
    border-radius: 12px;
    font-weight: bold;
    cursor: grab;
    font-size: 13px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    user-select: none;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .draggable-command i {
        margin-bottom: 5px;
        font-size: 1.2rem;
    }

    .draggable-command input {
        width: 30px;
        padding: 3px;
        border: none;
        border-radius: 4px;
        text-align: center;
        font-weight: bold;
        color: #333;
        margin-bottom: 5px;
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    }

    .draggable-command:active {
        cursor: grabbing;
        transform: scale(0.95);
    }

.move-block {
    background-color: #38b449;
}

.jump-block {
    background-color: #e30613;
}

.wait-block {
    background-color: #ff9900;
}

.loop-block {
    background-color: #8a2be2;
}

#code-area {
    border: 3px dashed #a0aec0;
    min-height: 280px;
    padding: 15px;
    background-color: #f7f9fb;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    position: relative;
}

#code-area-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #aaa;
    font-size: 1.1rem;
    font-style: italic;
}

.code-block {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

    .code-block input[type="number"] {
        width: 30px;
        padding: 5px;
        border: none;
        border-radius: 4px;
        text-align: center;
        font-weight: bold;
        margin: 0 5px;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    }

    .code-block.move {
        background-color: #38b449;
    }

        .code-block.move input[type="number"] {
            color: #38b449;
            background-color: #e6ffe9;
        }

    .code-block.jump {
        background-color: #e30613;
    }

        .code-block.jump input[type="number"] {
            color: #e30613;
            background-color: #ffeded;
        }

    .code-block.wait {
        background-color: #ff9900;
    }

        .code-block.wait input[type="number"] {
            color: #ff9900;
            background-color: #FFA500;
        }

    .code-block.start_loop, .code-block.end_loop {
        background-color: #8a2be2;
        border: 2px solid #5a1e94;
    }

        .code-block.start_loop select {
            padding: 5px;
            border-radius: 5px;
            border: none;
            font-weight: bold;
            margin-left: 8px;
            color: #5a1e94;
        }

.remove-btn {
    cursor: pointer;
    padding: 0 5px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

    .remove-btn:hover {
        color: white;
    }

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

    .action-buttons button {
        flex-grow: 1;
        padding: 15px;
        font-size: 16px;
        border-radius: 10px;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.2s;
    }

#btn-run {
    background-color: #004c99;
    color: white;
    border: 2px solid #004c99;
}

    #btn-run:hover {
        background-color: #003a7a;
    }

#btn-reset {
    background-color: #fff;
    color: #004c99;
    border: 2px solid #004c99;
}

    #btn-reset:hover {
        background-color: #eaf5ff;
    }

.code-block.drag-over-bottom::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #ffcc00;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.8);
    z-index: 5;
}

#message-box {
    font-weight: bold;
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-size: 16px;
    border-left: 5px solid;
}

.message-success {
    background-color: #e6ffed;
    color: #004d14;
    border-color: #009933;
}

.message-error {
    background-color: #ffeeee;
    color: #660000;
    border-color: #cc0000;
}

.message-info {
    background-color: #eaf5ff;
    color: #003366;
    border-color: #004c99;
}
