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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #222;
    font-family: 'Press Start 2P', cursive;
}

#game-container {
    width: 800px;
    height: 600px;
    position: relative;
    touch-action: none;
    overflow: hidden;
    background-image: url('Görseller/arka plan.png');
    background-size: auto 100%;
    background-repeat: repeat-x;
    background-position: 0 0;
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#character-container {
    position: absolute;
    width: 90px;
    height: 90px; /* Yaklaşık karakter boyutu */
    left: 100px;
    top: 250px;
    z-index: 10;
    transition: transform 0.1s ease;
}

#character {
    width: 100%;
    height: 100%;
}

#iphone-overlay {
    position: absolute;
    width: 35px; /* Biraz daha belirgin iPhone */
    left: 45px;  /* Karakterin yanına/önüne */
    top: 40px;   /* Karakterin el/kanat hizasına */
    z-index: 11;
    pointer-events: none;
    transform: rotate(15deg); /* Hafif açılı duruş */
}

#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 20px;
    text-shadow: 2px 2px 0 #000;
    z-index: 20;
    display: none;
}

#gold-display-ingame {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 16px;
    color: #ffcc00;
}

#gold-display-ingame img {
    width: 20px;
    height: 20px;
}

#ui-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
    color: white;
}

#ui-title {
    font-size: 40px;
    margin-bottom: 30px;
    color: #ffcc00;
    text-shadow: 4px 4px 0 #000;
}

#score-board {
    background-color: #eeddbb; /* Flappy Bird benzeri board rengi */
    padding: 20px;
    border: 4px solid #555;
    border-radius: 10px;
    text-align: right;
    color: #333;
    font-size: 16px;
    box-shadow: inset -4px -4px 0px rgba(0, 0, 0, 0.2), 4px 4px 0px #000;
    margin-bottom: 30px;
    width: 300px;
}

#score-board p {
    margin: 10px 0;
}

#score-board span {
    color: #fff;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#medal-container {
    text-align: center;
    margin-top: 15px;
    border-top: 2px solid #ccc;
    padding-top: 15px;
}

#medal {
    width: 60px;
    height: 60px;
    margin: 10px auto;
    border-radius: 50%;
    background-color: transparent;
    border: 4px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
    color: #333;
    font-weight: bold;
}

#start-instruction {
    font-size: 14px;
    animation: blink 1s infinite alternate;
    text-shadow: 2px 2px 0 #000;
}

@keyframes blink {
    from { opacity: 1; }
    to { opacity: 0; }
}

.pipe {
    position: absolute;
    width: 60px;
    background-color: #4a4a4a; /* Beton rengi */
    border: 4px solid #2a2a2a;
    box-shadow: inset 4px 0px 8px rgba(0,0,0,0.4), 4px 0px 0px rgba(0,0,0,0.5);
    z-index: 5;
    background-image: linear-gradient(90deg, #3a3a3a 0%, #5a5a5a 50%, #3a3a3a 100%);
}

/* Engel ucu - Last of Us havası için çıkıntılı beton blok */
.pipe::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 30px;
    left: -14px;
    background-color: #3a3a3a;
    border: 4px solid #1a1a1a;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.5);
}

.pipe-top {
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.pipe-top::after {
    bottom: -4px; /* Üst borunun başlığı en altta */
}

.pipe-bottom {
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}

.pipe-bottom::after {
    top: -4px; /* Alt borunun başlığı en üstte */
}
/* Login Overlay */
#login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('Görseller/arka plan.png');
    background-size: cover;
}

#login-box {
    background-color: #2c3e50;
    padding: 40px;
    border: 6px solid #f1c40f;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

#login-box h2 {
    color: #f1c40f;
    font-size: 28px;
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 #000;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #ecf0f1;
    font-size: 12px;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background-color: #34495e;
    border: 3px solid #2c3e50;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    border-radius: 5px;
}

#login-btn {
    width: 100%;
    padding: 15px;
    background-color: #27ae60;
    border: 4px solid #fff;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 0 #219150;
    border-radius: 8px;
}

#login-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Cheat Badge */
#cheat-badge {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #e74c3c;
    border: 3px solid #fff;
    color: #fff;
    font-size: 12px;
    border-radius: 5px;
    animation: flash 0.5s infinite alternate;
}

@keyframes flash {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

/* Market Button */
#market-btn {
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    background: linear-gradient(180deg, #f1c40f 0%, #f39c12 100%);
    border: 4px solid #fff;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 0 #d35400;
    transition: transform 0.1s;
}

#market-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #d35400;
}

/* Market Modal */
#market-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

#market-content {
    background-color: #2c3e50;
    width: 80%;
    max-height: 90%;
    border: 6px solid #ecf0f1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    overflow-y: auto;
}

#market-content h2 {
    color: #f1c40f;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 #000;
}

#market-gold {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #fff;
    margin-bottom: 30px;
}

#market-gold img {
    width: 40px;
}

.market-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.market-item {
    display: flex;
    align-items: center;
    background-color: #34495e;
    padding: 15px;
    border-radius: 8px;
    border: 3px solid #2c3e50;
}

.market-item img {
    width: 60px;
    height: 60px;
    margin-right: 20px;
    image-rendering: pixelated;
}

.item-info {
    flex-grow: 1;
    text-align: left;
}

.item-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #ffcc00;
}

.item-info p {
    font-size: 10px;
    color: #bdc3c7;
    margin-bottom: 5px;
}

.item-info .price {
    font-size: 12px;
    color: #2ecc71;
}

.buy-btn {
    padding: 10px 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    background-color: #27ae60;
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
}

.buy-btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.7;
}

#close-market {
    padding: 10px 30px;
    font-family: 'Press Start 2P', cursive;
    background-color: #e74c3c;
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
}

/* Item Indicators */
#item-indicators {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    z-index: 20;
}

#item-indicators div {
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 5px;
    border: 2px solid #fff;
    gap: 10px;
    color: #fff;
    font-size: 12px;
}

#item-indicators img {
    width: 30px;
    height: 30px;
}

.bullet {
    position: absolute;
    width: 30px;
    height: 15px;
    z-index: 15;
    image-rendering: pixelated;
    pointer-events: none;
}
