:root {
    --primary-color: #db2777;
    /* Pink */
    --secondary-color: #ec4899;
    --accent-color: #facc15;
    --background-color: #fce7f3;
    --text-color: #831843;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.btn-primary-small {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    margin-right: 15px;
}

#game-area {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    background-color: #fdf2f8;
}

.canvas-container {
    flex: 1;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    background: white;
}

.turtle {
    position: absolute;
    font-size: 2rem;
    transition: all 0.5s linear;
    transform-origin: center center;
    margin-top: -16px;
    /* center visual */
    margin-left: -16px;
}

.code-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blocks-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: #fbcfe8;
    border-radius: 10px;
}

.block {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 0 #9d174d;
}

.block:active {
    transform: translateY(2px);
}

.program-area {
    flex: 1;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.program-block {
    background: #db2777;
    color: white;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.remove-block {
    cursor: pointer;
    opacity: 0.7;
}

.placeholder {
    color: #94a3b8;
    text-align: center;
    margin-top: 50px;
}