@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    font-family: 'Fredoka', sans-serif;
    color: white;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    background: #000;
    display: block;
    width: 100%;
    height: 100%;
}

.menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 20, 10, 0.95);
    z-index: 1000;
}

.game-title {
    font-size: 4rem;
    color: #2ecc71;
    text-shadow: 0 5px 0 #27ae60, 0 10px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
    letter-spacing: 5px;
    text-align: center;
}

.game-subtitle {
    font-size: 1.5rem;
    color: #f1c40f;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.menu-input {
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #555;
    background: #222;
    color: white;
    border-radius: 8px;
    margin-bottom: 15px;
    width: 250px;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    text-transform: uppercase;
    outline: none;
    transition: 0.3s;
}

.menu-input:focus {
    border-color: #2ecc71;
}

.menu-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: white;
    transition: transform 0.1s, filter 0.2s;
    margin-bottom: 10px;
    width: 280px;
}

.menu-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.menu-btn:active {
    transform: scale(0.95);
}

.player-tag {
    background: #333;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
    display: inline-block;
    border: 1px solid #555;
}

#lobby-ui {
    display: none;
    text-align: center;
}

#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.notification {
    background: rgba(0, 0, 0, 0.8);
    border-left: 5px solid #2ecc71;
    color: white;
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 5px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* MOBİL KONTROLLER */
#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    display: none;
    /* JS or query shows it */
}

/* Sadece Mobilde ve Oyun Başladığında Görünmeli */
@media (max-width: 1024px),
(pointer: coarse) {
    #mobile-controls {
        display: block;
    }
}

.left-controls {
    position: absolute;
    bottom: 50px;
    left: 30px;
    pointer-events: auto;
}

.right-controls {
    position: absolute;
    bottom: 50px;
    right: 30px;
    display: flex;
    gap: 20px;
    pointer-events: auto;
}

.control-btn {
    width: 90px;
    height: 90px;
    background: rgba(46, 204, 113, 0.2);
    border: 3px solid rgba(46, 204, 113, 0.4);
    color: white;
    font-size: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.control-btn:active {
    background: rgba(46, 204, 113, 0.6);
    transform: scale(0.9);
}

#btn-up {
    width: 130px;
    height: 130px;
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.4);
    font-size: 3rem;
    color: #f1c40f;
}

#btn-up:active {
    background: rgba(241, 196, 15, 0.6);
}

#game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 150;
}

@media (max-width: 600px) {
    .game-title {
        font-size: 2.5rem;
    }

    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    #btn-up {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .left-controls {
        bottom: 30px;
        left: 20px;
    }

    .right-controls {
        bottom: 30px;
        right: 20px;
        gap: 10px;
    }
}