/* Extracted from: app/views/livecasino/index.php */
/* <style> block #1, lines 22-603 */

:root {
    --primary-color: #2f8444;
    --primary-hover: #52aa68;
    --gold-accent: #e8c547;
    --bg-dark: #0b1511;
    --bg-card: #13281e;
    --bg-card-soft: linear-gradient(180deg, rgba(21, 61, 30, 0.78) 0%, rgba(15, 41, 28, 0.94) 52%, #0b1511 100%);
    --text-light: #eafdf2;
    --text-gray: #c5e8d4;
    --text-muted: #7dab8f;
    --border-color: rgba(47, 132, 68, 0.42);
    --border-strong: rgba(47, 132, 68, 0.58);
    --transition: all 0.2s ease;
}

.casino-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px 30px;
    min-height: 100vh;
}

.sub-menu-container {
    background: var(--bg-card-soft);
    margin: 10px 0 20px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(82, 170, 104, 0.08);
}

.top-filter-bar {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(21, 61, 30, 0.35);
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-light);
    background: rgba(47, 132, 68, 0.1);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.filter-count {
    background: var(--primary-color);
    color: #fff;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    border-radius: 3px;
}

.providers-filter-bar {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 41, 28, 0.55);
}

.providers-filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.providers-filter-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.providers-filter-title h3 i {
    color: var(--primary-color);
}

.see-all-providers {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
}

.see-all-providers:hover {
    border-color: var(--primary-color);
    color: var(--text-light);
    background: rgba(47, 132, 68, 0.1);
}

.providers-scroll-container {
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.providers-scroll-container::-webkit-scrollbar {
    display: none;
    height: 0;
}

.providers-scroll {
    display: flex;
    gap: 8px;
    min-width: max-content;
    padding: 5px 0;
}

.provider-chip {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
}

.provider-chip:hover {
    border-color: var(--primary-color);
    color: var(--text-light);
    background: rgba(47, 132, 68, 0.1);
}

.provider-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 18, 12, 0.88);
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal, .providers-modal {
    background: linear-gradient(180deg, #153d1e 0%, #0f291c 44%, #0b1511 100%);
    border: 1px solid var(--border-strong);
    width: 95%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    display: none;
    border-radius: 8px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 22px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(21, 61, 30, 0.65);
}

.search-modal.active, .providers-modal.active {
    display: block;
}

.providers-modal {
    max-width: 900px;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(47, 132, 68, 0.28) 0%, rgba(21, 61, 30, 0.42) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title i {
    color: var(--primary-color);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(11, 21, 17, 0.42);
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.search-modal-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: rgba(15, 41, 28, 0.92);
    border: 1px solid var(--border-strong);
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(82, 170, 104, 0.06);
}

.search-modal-input:focus {
    outline: none;
    border-color: rgba(82, 170, 104, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(82, 170, 104, 0.08),
        0 0 0 2px rgba(47, 132, 68, 0.35);
}

.search-modal-input::placeholder {
    color: var(--text-muted);
}

.search-modal-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(159, 212, 174, 0.75);
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.provider-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(15, 41, 28, 0.72);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(82, 170, 104, 0.06);
}

.provider-option:hover {
    border-color: rgba(82, 170, 104, 0.85);
    background: rgba(47, 132, 68, 0.22);
}

.provider-option.selected {
    border-color: rgba(232, 197, 71, 0.45);
    background: rgba(47, 132, 68, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.provider-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.provider-option label {
    cursor: pointer;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.provider-option.selected label {
    color: var(--text-light);
    font-weight: 600;
}

.modal-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(15, 41, 28, 0.72);
    box-shadow: inset 0 1px 0 rgba(82, 170, 104, 0.06);
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(47, 132, 68, 0.1);
    color: var(--text-light);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(47, 132, 68, 0.05);
    border-bottom: 1px solid var(--border-color);
    display: none;
}

.active-filters.has-filters {
    display: flex;
}

.active-filter {
    background: var(--primary-color);
    color: #fff;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
}

.active-filter .remove {
    cursor: pointer;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border-radius: 2px;
}

.active-filter .remove:hover {
    background: rgba(255, 255, 255, 0.3);
}

.results-info {
    text-align: center;
    margin: 15px 0;
    color: var(--text-gray);
    font-size: 13px;
}

.results-info strong {
    color: var(--primary-color);
}

/* Oyun grid'i */
#gamesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 15px;
    background: var(--bg-card-soft);
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    margin-top: 20px;
    box-shadow: inset 0 1px 0 rgba(82, 170, 104, 0.06);
}

#gamesContainer .game-item {
    background: linear-gradient(180deg, rgba(21, 61, 30, 0.62) 0%, rgba(11, 21, 17, 0.94) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(82, 170, 104, 0.12);
}

#gamesContainer .game-item:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 22px rgba(47, 132, 68, 0.35),
        0 2px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(182, 245, 207, 0.14);
    border-color: rgba(82, 170, 104, 0.95);
}

#gamesContainer .game-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: linear-gradient(180deg, #0f291c 0%, #070f0c 100%);
    display: block;
}

.game-name {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-light);
    padding: 8px 10px 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
}

.game-provider {
    background: var(--primary-color);
    color: #fff;
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    border-radius: 3px;
    margin: 0 10px 10px;
    align-self: flex-start;
}

.load-more-section {
    display: flex;
    justify-content: center;
    margin: 40px 0 60px;
    padding: 20px 0;
    background: var(--bg-dark);
    border-radius: 8px;
}

.load-more-btn {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 35px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
    border-radius: 6px;
}

.load-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 132, 68, 0.3);
}

.load-more-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Iframe popup kaldırıldı, yeni sekme açılacak */

@media (max-width: 768px) {
    .casino-container { padding: 0 8px 25px; }
    .top-filter-bar { padding: 12px; }
    .filter-btn { padding: 6px 12px; font-size: 12px; }
    .provider-chip { padding: 6px 12px; font-size: 11px; }
    #gamesContainer { grid-template-columns: repeat(2, 1fr); }
    #gamesContainer .game-item img { height: 100px; }
}

@media (max-width: 480px) {
    .top-filter-bar { justify-content: center; }
    .providers-grid { grid-template-columns: 1fr; }
    .modal-actions { flex-direction: column; }
    .modal-btn { width: 100%; justify-content: center; }
}
