/* Genel Stiller */
:root {
    --primary-color: #e94560;
    --dark-bg: #1a1a2e;
    --dark-secondary: #16213e;
    --text-color: #fff;
    --gold-color: #ffd700;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle, rgba(40,40,70,1) 0%, rgba(26,26,46,1) 100%);
    color: var(--text-color);
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-in-out;
}

.hidden {
    display: none !important;
    opacity: 0;
}

/* Dil Seçimi */
#language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1100;
}
#language-selector button {
    background: var(--dark-secondary);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 8px 12px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}
#language-selector button:hover {
    background-color: var(--primary-color);
}
#language-selector button.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Yükleme Ekranı */
#loading-screen {
    background-color: #0f0f18;
    z-index: 30;
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.loading-content h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin: 0;
    text-shadow: 0 0 15px var(--primary-color);
}
.progress-bar-container {
    width: 250px;
    height: 20px;
    background-color: var(--dark-secondary);
    border-radius: 10px;
    border: 1px solid var(--primary-color);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e94560, #ff7b54);
    border-radius: 10px;
    transition: width 0.1s linear;
}
#loading-percentage {
    font-size: 16px;
    color: var(--text-color);
}


/* Giriş Ekranı */
#login-screen {
    z-index: 20;
    overflow-y: auto;
    padding: 20px 0;
}
.login-box {
    background-color: var(--dark-secondary);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255,255,255,0.1);
}
.login-box input {
    width: 80%;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #0f3460;
    border-radius: 5px;
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-size: 16px;
}
.login-box button {
    width: 85%;
    padding: 12px;
    margin-top: 20px;
    background: linear-gradient(45deg, #e94560, #ff7b54);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* Bilgi Kutusu Stili */
.game-info-box {
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
}
.game-info-box h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 5px;
}
.game-info-box p {
    margin-top: 0;
    line-height: 1.5;
}
#rewards-preview-list {
    font-size: 13px;
    color: #ccc;
    padding-left: 20px;
    margin: 5px 0;
}
#rewards-preview-list ul {
    margin: 0;
    padding: 0;
    list-style-type: '★ ';
}


.legal-footer {
    margin-top: 30px;
    font-size: 10px;
    color: #888;
    line-height: 1.4;
}
.legal-footer p {
    margin: 5px 0;
}

/* Oyun Ekranı */
#game-screen {
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    box-sizing: border-box;
    gap: 10px;
    position: relative;
}

#extra-spins-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, rgba(255,215,0,0.95), rgba(255,165,0,0.95));
    color: white;
    padding: 20px 40px;
    font-size: 32px;
    font-weight: bold;
    border-radius: 15px;
    z-index: 50;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    animation: fadeInOut 2s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}


.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    flex-wrap: wrap; 
    gap: 10px;
}

.balance-bet-panel {
    display: flex;
    background-color: rgba(0,0,0,0.3);
    padding: 8px 15px;
    border-radius: 20px;
    gap: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}
.balance-container, .bet-container {
    text-align: center;
}
.balance-container span, .bet-container span {
    display: block;
    font-size: 12px;
    color: #aaa;
    font-weight: bold;
}
#balance-display, #bet-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
}

.bet-adjust {
    display: flex;
    align-items: center;
    gap: 10px;
}
#bet-decrease, #bet-increase {
    background-color: var(--dark-secondary);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
#bet-decrease:hover, #bet-increase:hover {
    background-color: var(--primary-color);
}

#game-grid {
    width: 100%;
    max-width: 80vh;
    aspect-ratio: 6 / 5;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    overflow: hidden;
}

#bonus-overlay {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 0 0 20px 20px;
    z-index: 15;
    border: 2px solid var(--primary-color);
    border-top: none;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}
.bonus-info-box {
    text-align: center;
    color: white;
}
.bonus-info-box span {
    display: block;
    text-transform: uppercase;
    font-size: 14px;
}
#total-bonus-win-amount, #free-spins-count {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold-color);
}

.symbol {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: absolute;
    width: calc(100% / 6);
    height: calc(100% / 5);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.symbol.winning {
    animation: winning-pulse 0.5s ease-in-out forwards;
    background-color: rgba(255, 215, 0, 0.3);
    border-radius: 50%;
}

@keyframes winning-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.symbol.disappearing {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

.symbol img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    -webkit-user-drag: none;
    user-select: none;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.5));
}

.symbol img[alt="peach"] {
    transform: scale(0.85);
}

.multiplier-value {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px black, 0 0 10px black;
    pointer-events: none;
}

.game-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.center-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

#tasks-button, #market-button, #info-button {
    background-color: var(--dark-secondary);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background-color 0.2s;
}
#tasks-button:hover, #market-button:hover, #info-button:hover {
    background-color: var(--primary-color);
    color: white;
}

#spin-win-display {
    background-color: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
    border: 1px solid rgba(255,255,255,0.1);
}
#spin-win-display span {
    display: block;
}
#spin-win-amount {
    font-size: 24px;
    color: var(--gold-color);
    font-weight: bold;
}

#spin-button {
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 40px;
    border: 5px solid rgba(255,255,255,0.5);
    line-height: 1;
    padding-bottom: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
#spin-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #28a745;
}


#buy-bonus-button {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    color: white;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 25px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
#buy-bonus-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

#buy-bonus-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* ANTE BET ANAHTARI */
#ante-bet-control {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ante-bet-text {
    text-align: left;
}
.ante-bet-text strong {
    display: block;
    font-size: 14px;
}
.ante-bet-text span {
    font-size: 12px;
    color: #aaa;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4f4f4f;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}


/* MOBİL UYUM (GELİŞTİRİLDİ) */
@media (max-width: 768px) {
    .login-box {
        padding: 20px;
        width: 85%;
    }
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    .balance-bet-panel {
        gap: 15px;
        padding: 5px 10px;
    }
    .game-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 0 10px;
    }
    #ante-bet-control {
        grid-column: 1 / 3; /* Tam genişlik kapla */
        order: 3;
        justify-content: center;
    }
    .center-buttons {
        grid-column: 1 / 2;
        order: 1;
        justify-content: flex-start;
    }
    #buy-bonus-button {
        grid-column: 2 / 3;
        order: 2;
        justify-self: flex-end;
    }
    #spin-button {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    #buy-bonus-button {
        padding: 10px 15px;
        font-size: 12px;
    }
    #spin-win-display {
        display: none; /* Mobilde yer kazanmak için kazanç göstergesini gizle */
    }
}

/* MODAL (PENCERE) STİLLERİ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--dark-secondary);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    max-width: 400px;
    width: 90%;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.modal-content p {
    font-size: 18px;
    line-height: 1.6;
}

#bonus-cost-display, #final-bonus-win-amount {
    color: var(--gold-color);
    font-weight: bold;
}

.modal-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.modal-button:hover {
    transform: translateY(-2px);
}

.modal-button.confirm {
    background: linear-gradient(45deg, #28a745, #218838);
}
.modal-button.confirm:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.modal-button.cancel {
    background-color: #6c757d;
}

/* BİLGİ EKRANI ÖZEL STİLLERİ */
.info-modal-content {
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.info-page {
    display: none;
}
.info-page.active-page {
    display: block;
}

.payout-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.payout-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.payout-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.payout-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.info-nav {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#info-page-indicator {
    font-weight: bold;
}

.bonus-trigger-img {
    width: 100px;
    height: 100px;
    animation: pulse 1.5s infinite;
}

#final-bonus-win-amount {
    display: block;
    font-size: 48px;
    font-weight: bold;
    margin: 10px 0 20px 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* GÖREVLER PENCERESİ */
#tasks-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #0f3460;
}

.task-text {
    text-align: left;
    font-size: 14px;
}

.task-button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.task-button:hover {
    background-color: #c73a51;
}

.task-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
