:root {
    --bg-level-2: #344200;
    --bg-level-3: #688500;
    --text-level-high: #ffffff;
}

/* Promotional Images Styles */
.promo-images {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 0.5rem 20px;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 100%;
}

.promo-link {
    flex: 1;
    display: block;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 15/9;
    max-width: calc(33.333% - 10px);
    position: relative;
    box-shadow: 0 0 0 rgba(128, 161, 12, 0);
}

.promo-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, rgba(128, 161, 12, 0.2) 0%, rgba(104, 133, 0, 0) 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 10px;
}

.promo-link:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 0 20px rgba(128, 161, 12, 0.4);
}

.promo-link:hover::before {
    opacity: 1;
}

.promo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@media screen and (max-width: 768px) {
    .promo-images {
        flex-direction: column;
        gap: 10px;
        padding: 0.5rem 10px;
    }
    
    .promo-link {
        max-width: 100%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a2100;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 20px;
    overflow-x: auto;
}

.dynamic_featured_item {
    border-radius: 16px;
    margin: 6px;
    -ms-flex-preferred-size: 224px;
    flex-basis: 224px;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-level-2);
    border: 1px solid var(--bg-level-3);
    color: var(--text-level-high);
    padding: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 0 0 rgba(104, 133, 0, 0);
}

.dynamic_featured_item:hover {
    transform: translateY(-5px);
    background-color: #3d4d00;
    box-shadow: 0 0 20px rgba(104, 133, 0, 0.4);
    border-color: #799900;
}

.dynamic_featured_item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dynamic_featured_item:hover::after {
    opacity: 1;
}

.dynamic_featured_item img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    padding: 5px;
}

.dynamic_featured_item h3 {
    text-align: center;
    margin-top: 5px;
    color: var(--text-level-high);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

/* Responsive Tasarım */
@media screen and (max-width: 1200px) {
    .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .dynamic_featured_item {
        flex-basis: 180px;
    }
}

@media screen and (max-width: 768px) {
    .dynamic_featured_item {
        flex-basis: 150px;
    }
    .dynamic_featured_item img {
        height: 70px;
    }
    .dynamic_featured_item h3 {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
        gap: 5px;
    }
    .dynamic_featured_item {
        flex-basis: calc(50% - 12px);
        margin: 3px;
    }
    .dynamic_featured_item img {
        height: 60px;
    }
}

.main-content {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding: 0 20px;
    min-height: 280px;
}

.games-section {
    width: 75%;
    display: flex;
    flex-direction: column;
}

.winners-section {
    width: 25%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.games-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
}

.games-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.3s ease-in-out;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
    width: 100%;
    min-height: 280px;
}

.game-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    aspect-ratio: 4/2.4;
    width: 100%;
    height: 100%;
    display: none;
}

/* Varsayılan görünürlük kurallarını kaldır */
/* .game-item:nth-child(-n+8) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #21212b;
    padding: 0;
} */

/* Crash section için görünürlük kuralını kaldır */
/* .crash-section .game-item:nth-child(-n+12) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #21212b;
    padding: 0;
} */

/* Görünür olan oyunlar için stil */
.game-item[style*="display: flex"] {
    align-items: center;
    justify-content: center;
    background: #21212b;
    padding: 0;
}

.game-item:hover {
    transform: translateY(-5px);
}

.game-item img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
}

.game-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    gap: 8px;
}

.game-item:hover .game-buttons {
    opacity: 1;
}

.game-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.real-button {
    background: linear-gradient(to right, #394709, #80a10c);
    color: white;
    box-shadow: 0 0 10px rgba(128, 161, 12, 0.3);
    font-size: 13px;
    min-width: 120px;
}

.real-button:hover {
    background: linear-gradient(to right, #80a10c, #394709);
    box-shadow: 0 0 15px rgba(128, 161, 12, 0.5);
    transform: translateY(-2px);
}

.demo-button {
    background: linear-gradient(to right, #344200, #688500);
    color: white;
    box-shadow: 0 0 10px rgba(104, 133, 0, 0.3);
    font-size: 11px;
    min-width: 100px;
    padding: 6px 12px;
}

.demo-button:hover {
    background: linear-gradient(to right, #688500, #344200);
    box-shadow: 0 0 15px rgba(104, 133, 0, 0.5);
    transform: translateY(-2px);
}

.or-divider {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin: 3px 0;
    text-transform: uppercase;
    font-weight: 400;
}

@media screen and (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.winners-card {
    background-color: var(--bg-level-2);
    border: 1px solid var(--bg-level-3);
    border-radius: 16px;
    padding: 15px;
    margin-top: 20px;
    height: 100%;
    min-height: 280px;
    overflow: hidden;
    position: relative;
}

/* İkinci main-content içindeki winners-card için özel stil */
.main-content:nth-child(4) .winners-section .winners-card {
    height: 100%;
    min-height: 280px;
}

.winners-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.winners-scroll {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease;
    animation: scrollWinners 20s linear infinite;
}

@keyframes scrollWinners {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.winner-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-level-3);
    align-items: flex-start;
    height: 90px; /* Her kazanan için sabit yükseklik */
    opacity: 1;
    transition: all 0.5s ease;
}

.winner-game-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 12px;
}

.winner-info {
    flex: 1;
}

.winner-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.winner-amount {
    color: #80a10c;
    font-weight: 700;
    font-size: 16px;
    margin: 4px 0;
}

.winner-date {
    font-size: 12px;
    color: #a0a0a0;
}

#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    display: none;
}

#gameModal {
    display: none;
    position: fixed;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 90%;
    background: #1e1e27;
    z-index: 9999;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    height: 40px;
    background: #1e1e27 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.modal-title {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 10px !important;
    margin-right: 0 !important;
}

.modal-title .casino-text {
    opacity: 0.7;
    color: #fff;
    font-weight: normal;
}

.modal-title .game-name {
    color: #fff;
    font-weight: 500;
    margin-left: 5px;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 5px !important;
    margin-left: auto !important;
    padding-right: 53px !important;
}

.deposit-btn {
    margin: 0 !important;
    padding: 0 12px !important;
    background: #2d2d3d !important;
    color: #fff;
    border: none;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 3px;
    height: 28px !important;
}

.action-btn, .close-btn {
    margin: 0 !important;
    width: 28px;
    height: 28px !important;
    background: #2d2d3d;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform: translateY(0) !important;
}

.close-btn {
    margin-bottom: 0 !important;
    transform: translateY(-5px) !important;
}

.action-btn:hover {
    background: #3d3d4d;
}

.close-btn:hover {
    background: #ff3b3b;
}

.modal-content {
    width: 100%;
    height: calc(100% - 40px);
    background: #21212b;
    position: relative;
    z-index: 9;
    flex-grow: 1;
    overflow: hidden;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

.section-header {
    background-color: #394709 !important;
    border-color: #80a10c;
    color: var(--text-level-high);
    align-items: center;
    transition: all .25s linear;
    padding: 9px 20px;
    border-radius: 48px;
    min-width: 44px;
    display: inline-flex;
    border: 1px solid #80a10c;
    box-shadow: 0 0 1px #80a10c;
    width: auto;
    white-space: nowrap;
}

.section-title {
    margin: 0 15px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-container.left-aligned {
    justify-content: flex-start;
}

.arrow__prev, .arrow__next {
    width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all .314s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-level-2);
    border: 1px solid var(--bg-level-3);
    color: var(--text-level-high);
    font-size: 18px;
    font-weight: 300;
    z-index: 10;
}

.arrow__prev:hover, .arrow__next:hover {
    background-color: #3d4d00;
    border-color: #80a10c;
    box-shadow: 0 0 15px rgba(128, 161, 12, 0.3);
    transform: scale(1.05);
}

.arrow__prev[style*="cursor: default"], .arrow__next[style*="cursor: default"] {
    opacity: 0.5;
    pointer-events: none;
}

.arrow-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.games-container, .winners-card {
    flex: 1;
    margin-top: 20px;
}

.crash-section {
    padding: 0 20px;
}

.crash-section .games-section {
    width: 100%;
}

.crash-section .games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
    width: 100%;
    min-height: 280px;
}

@media screen and (max-width: 1200px) {
    .crash-section .games-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .crash-section .games-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .crash-section .games-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.live-matches-section {
    padding: 0 20px;
    margin-top: 30px;
}

.live-matches-section .games-section {
    width: 100%;
}

.live-matches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

@media screen and (max-width: 1200px) {
    .live-matches-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .live-matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .live-matches-grid {
        grid-template-columns: 1fr;
    }
}

.match-card {
    background: var(--bg-level-2);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--bg-level-3);
    animation: fadeIn 0.5s ease-in-out;
    min-width: 0; /* Kartların sıkışmasını önler */
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-level-high);
    font-size: 14px;
    font-weight: 500;
    gap: 10px; /* Takım isimleri arasında boşluk */
}

.match-teams span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.match-teams span:first-child {
    text-align: left;
}

.match-teams span:last-child {
    text-align: right;
}

.score {
    flex: 0 0 auto;
    background: var(--bg-level-3);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.score.match-live {
    background: #80a10c;
    color: white;
    animation: pulse 2s infinite;
}

.score.match-finished {
    background: #344200;
    color: #a0a0a0;
}

.score.match-prematch {
    background: #688500;
    color: white;
    font-weight: 600;
}

.time.prematch {
    color: #688500;
    font-weight: 600;
    font-family: monospace;
    font-size: 14px;
    background: rgba(104, 133, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 12px;
}

.time {
    color: #80a10c;
    font-weight: 700;
    font-family: monospace;
    font-size: 14px;
    background: rgba(128, 161, 12, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    position: relative;
}

.time.first-half::before {
    content: '1H';
    font-size: 10px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #80a10c;
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
}

.time.second-half::before {
    content: '2H';
    font-size: 10px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #80a10c;
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
}

.match-state {
    color: #ff9900;
    background: rgba(255, 153, 0, 0.1);
    font-weight: 700;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.time.half-time,
.match-state.half-time {
    color: #ff9900;
    background: rgba(255, 153, 0, 0.1);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: blink 1s infinite;
}

.status-indicator.first-half,
.status-indicator.second-half {
    background-color: #80a10c;
}

.status-indicator.half-time {
    background-color: #ff9900;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.competition {
    color: #a0a0a0;
    font-size: 12px;
    max-width: 60%;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-odds {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 8px;
}

.odd-box {
    flex: 1;
    background: var(--bg-level-3);
    border-radius: 4px;
    padding: 4px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 40px;
}

.odd-box:hover {
    background: #80a10c;
}

.odd-value {
    display: block;
    color: var(--text-level-high);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.odd-label {
    display: block;
    color: #a0a0a0;
    font-size: 10px;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .live-matches-grid {
        grid-template-columns: 1fr;
    }
}

/* Yükleniyor göstergesi için stiller */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-level-high);
    width: 100%;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-level-3);
    border-top: 4px solid var(--accent-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Maç kartları için ek stiller */
.match-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.3s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card:nth-child(1) { animation-delay: 0.1s; }
.match-card:nth-child(2) { animation-delay: 0.2s; }
.match-card:nth-child(3) { animation-delay: 0.3s; }
.match-card:nth-child(4) { animation-delay: 0.4s; }

.match-card .odd-box.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--bg-level-3);
    font-size: 12px;
    color: var(--text-level-high);
}

.match-date {
    opacity: 0.7;
}

.match-markets-count {
    color: var(--accent-light);
    font-weight: 500;
}

.no-matches {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-level-high);
    font-size: 14px;
    opacity: 0.7;
} 