/* Genel Ayarlar */
:root {
    --primary-color: #6C5CE7;
    --secondary-color: #A29BFE;
    --background-color: #FFEAA7;
    --text-color: #2D3436;
    --accent-color: #00B894;
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- YENİ EKLENEN BÖLÜM: YÜKLEME EKRANI --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* --- YENİ BÖLÜM SONU --- */


#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

header {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
}

.game-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.stage {
    width: 90%;
    max-width: 900px;
    height: 400px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border: 5px solid var(--primary-color);
    position: relative;
    margin-bottom: 2rem;
    padding: 10px;
    overflow: hidden;
}

.monster-tray {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    max-width: 90%;
}

.monster {
    width: 80px;
    height: 80px;
    cursor: grab;
    transition: transform 0.2s ease-in-out;
    object-fit: contain;
}

.monster:hover {
    transform: scale(1.1);
}

.monster-on-stage {
    width: 100px;
    height: 100px;
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    object-fit: contain;
}

.monster-on-stage:hover {
    transform: scale(1.2);
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: white;
    margin-top: auto;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

.explanation {
    max-width: 800px;
    margin: 1rem auto 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    .stage {
        height: 300px;
    }
    .monster {
        width: 60px;
        height: 60px;
    }
    .monster-on-stage {
        width: 80px;
        height: 80px;
    }
    .explanation {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
}