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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    color: white;
    min-height: 100vh;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100vh;
}

/* Ana oyun canvas */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    background: #1a1a2e;
    cursor: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#gameCanvas:hover {
    cursor: none;
}

/* Oyun UI */
#gameUI {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#topLeft {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    max-width: calc(100% - 40px);
}

#topRight {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    text-align: right;
    max-width: calc(100% - 40px);
}

#scoreDisplay, #lengthDisplay, #timerDisplay, #playersAlive {
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#score, #length, #zoneTimer, #aliveCount {
    color: #ffd700;
}

/* Minimap */
#minimap {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

#minimapCanvas {
    border-radius: 5px;
    border: 2px solid #ffd700;
    max-width: 100%;
    height: auto;
}

/* Boost bar */
#boostBar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    max-width: calc(100% - 40px);
}

#boostFill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d);
    width: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

#boostText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Başlangıç ekranı */
#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(20px);
    padding: 20px;
}

#startContent {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    overflow-y: auto;
    max-height: 90vh;
}

#startContent h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

#startContent p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #ccc;
}

#playerName {
    width: 300px;
    max-width: 100%;
    padding: 15px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

#playerName::placeholder {
    color: #ccc;
}

#instructions {
    text-align: left;
    margin: 30px 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

#instructions h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

#instructions ul {
    list-style: none;
}

#instructions li {
    margin: 10px 0;
    padding-left: 10px;
    word-wrap: break-word;
}

#startGameBtn, #playAgainBtn {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    width: 100%;
    max-width: 300px;
}

#startGameBtn:hover, #playAgainBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Oyun sonu ekranı */
#gameOverScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(20px);
    padding: 20px;
}

#gameOverContent {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
}

#gameOverTitle {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #ff6b6b;
    word-wrap: break-word;
}

#finalStats {
    margin: 30px 0;
    font-size: 1.2em;
}

#finalStats p {
    margin: 10px 0;
}

#finalRank, #finalScore, #finalLength {
    color: #ffd700;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Animasyonlar */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive tasarım - Tablet (768px ve altı) */
@media (max-width: 768px) {
    #topLeft, #topRight {
        font-size: 14px;
        padding: 10px;
        top: 10px;
    }
    
    #topLeft {
        left: 10px;
    }
    
    #topRight {
        right: 10px;
    }
    
    #minimap {
        width: 120px;
        height: 120px;
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
    
    #minimapCanvas {
        width: 120px;
        height: 120px;
    }
    
    #boostBar {
        width: 150px;
        bottom: 10px;
        height: 18px;
    }
    
    #startContent {
        padding: 20px;
        margin: 10px;
    }
    
    #startContent h1 {
        font-size: 2em;
    }
    
    #startContent p {
        font-size: 1em;
    }
    
    #playerName {
        width: 250px;
        padding: 12px;
        font-size: 14px;
    }
    
    #instructions {
        padding: 15px;
        margin: 20px 0;
    }
    
    #instructions li {
        font-size: 14px;
        margin: 8px 0;
    }
    
    #startGameBtn, #playAgainBtn {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    #gameOverTitle {
        font-size: 2em;
    }
    
    #finalStats {
        font-size: 1em;
    }
    
    /* Mobil kontroller tablet */
    #joystickContainer {
        bottom: 70px;
        left: 40px;
        width: 70px;
        height: 70px;
    }
    
    #joystickStick {
        width: 30px;
        height: 30px;
    }
    
    #boostButton {
        bottom: 70px;
        right: 40px;
        width: 60px;
        height: 60px;
    }
    
    #boostButtonInner {
        font-size: 1.3em;
    }
}

/* Responsive tasarım - Mobil (480px ve altı) */
@media (max-width: 480px) {
    #topLeft, #topRight {
        font-size: 12px;
        padding: 8px;
        top: 5px;
    }
    
    #topLeft {
        left: 5px;
    }
    
    #topRight {
        right: 5px;
    }
    
    #scoreDisplay, #lengthDisplay, #timerDisplay, #playersAlive {
        font-size: 12px;
        margin: 3px 0;
    }
    
    #minimap {
        width: 100px;
        height: 100px;
        bottom: 5px;
        right: 5px;
        padding: 5px;
    }
    
    #minimapCanvas {
        width: 100px;
        height: 100px;
    }
    
    #boostBar {
        width: 120px;
        bottom: 5px;
        height: 16px;
    }
    
    #boostText {
        font-size: 10px;
    }
    
    #startContent {
        padding: 15px;
        margin: 5px;
    }
    
    #startContent h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    #startContent p {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    #playerName {
        width: 200px;
        padding: 10px;
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    #instructions {
        padding: 10px;
        margin: 15px 0;
    }
    
    #instructions h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    #instructions li {
        font-size: 12px;
        margin: 6px 0;
        line-height: 1.4;
    }
    
    #startGameBtn, #playAgainBtn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    #gameOverContent {
        padding: 20px;
    }
    
    #gameOverTitle {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    #finalStats {
        font-size: 0.9em;
        margin: 20px 0;
    }
    
    #finalStats p {
        margin: 8px 0;
    }
    
    /* Mobil kontroller mobil */
    #joystickContainer {
        bottom: 60px;
        left: 30px;
        width: 60px;
        height: 60px;
    }
    
    #joystickStick {
        width: 25px;
        height: 25px;
    }
    
    #boostButton {
        bottom: 60px;
        right: 30px;
        width: 50px;
        height: 50px;
    }
    
    #boostButtonInner {
        font-size: 1.1em;
    }
}

/* Responsive tasarım - Küçük mobil (320px ve altı) */
@media (max-width: 320px) {
    #topLeft, #topRight {
        font-size: 10px;
        padding: 5px;
    }
    
    #scoreDisplay, #lengthDisplay, #timerDisplay, #playersAlive {
        font-size: 10px;
        margin: 2px 0;
    }
    
    #minimap {
        width: 80px;
        height: 80px;
        padding: 3px;
    }
    
    #minimapCanvas {
        width: 80px;
        height: 80px;
    }
    
    #boostBar {
        width: 100px;
        height: 14px;
    }
    
    #boostText {
        font-size: 8px;
    }
    
    #startContent h1 {
        font-size: 1.2em;
    }
    
    #startContent p {
        font-size: 0.8em;
    }
    
    #playerName {
        width: 180px;
        padding: 8px;
        font-size: 12px;
    }
    
    #instructions li {
        font-size: 11px;
    }
    
    #startGameBtn, #playAgainBtn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    #gameOverTitle {
        font-size: 1.2em;
    }
    
    #finalStats {
        font-size: 0.8em;
    }
    
    /* Mobil kontroller küçük mobil */
    #joystickContainer {
        bottom: 50px;
        left: 25px;
        width: 50px;
        height: 50px;
    }
    
    #joystickStick {
        width: 20px;
        height: 20px;
    }
    
    #boostButton {
        bottom: 50px;
        right: 25px;
        width: 45px;
        height: 45px;
    }
    
    #boostButtonInner {
        font-size: 1em;
    }
}

/* Yatay mod için özel düzenlemeler */
@media (max-height: 500px) and (orientation: landscape) {
    #startContent {
        padding: 10px;
        max-height: 95vh;
    }
    
    #startContent h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    #startContent p {
        font-size: 0.9em;
        margin-bottom: 15px;
    }
    
    #playerName {
        width: 200px;
        padding: 8px;
        margin-bottom: 15px;
    }
    
    #instructions {
        padding: 10px;
        margin: 10px 0;
    }
    
    #instructions h3 {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    #instructions li {
        font-size: 11px;
        margin: 4px 0;
    }
    
    #startGameBtn, #playAgainBtn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    #minimap {
        width: 80px;
        height: 80px;
    }
    
    #minimapCanvas {
        width: 80px;
        height: 80px;
    }
    
    #boostBar {
        width: 120px;
        height: 16px;
    }
    
    /* Mobil kontroller yatay mod */
    #joystickContainer {
        bottom: 40px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    #joystickStick {
        width: 18px;
        height: 18px;
    }
    
    #boostButton {
        bottom: 40px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    #boostButtonInner {
        font-size: 0.9em;
    }
}

/* Touch cihazlar için özel düzenlemeler */
@media (hover: none) and (pointer: coarse) {
    #startGameBtn, #playAgainBtn {
        min-height: 44px; /* Touch hedef boyutu */
    }
    
    #playerName {
        min-height: 44px;
    }
    
    #topLeft, #topRight {
        min-height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Mobil kontroller */
#mobileControls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

#mobileControls.hidden {
    display: none;
}

/* Joystick */
#joystickContainer {
    position: absolute;
    bottom: 80px;
    left: 50px;
    width: 80px;
    height: 80px;
    pointer-events: all;
}

#joystickBase {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#joystickStick {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

#joystickStick.active {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Boost butonu */
#boostButton {
    position: absolute;
    bottom: 80px;
    right: 50px;
    width: 70px;
    height: 70px;
    pointer-events: all;
}

#boostButtonInner {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 1.5em;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#boostButtonInner:active {
    transform: scale(0.9);
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

#boostButtonInner.active {
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    animation: pulse 0.5s infinite;
} 