/* SloganBahis - Siyah & Kırmızı Şık Tema */
:root {
    --bg-primary: #0b0b0d;
    --bg-secondary: #16161a;
    --bg-tertiary: #1f1f24;
    --text-primary: #ffffff;
    --text-secondary: #b3b3bd;
    --accent: #ed1c24;
    --accent-hover: #ff3b43;
    --accent-dark: #b3121a;
    --border-color: #2a2a30;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Benzersiz casino temalı arka plan: poker çipleri + ♠ ♥ ♦ ♣ deseni (en üst katman) + kırmızı parıltılar */
body {
    background-color: var(--bg-primary);
    background-image:
        url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='300'%20viewBox='0%200%20300%20300'%3E%3Cg%20font-family='Georgia,serif'%3E%3Ctext%20x='34'%20y='80'%20font-size='46'%20fill='%23ed1c24'%20opacity='0.18'%3E%26%239824;%3C/text%3E%3Ctext%20x='190'%20y='140'%20font-size='40'%20fill='%23ffffff'%20opacity='0.11'%3E%26%239827;%3C/text%3E%3Ctext%20x='70'%20y='250'%20font-size='36'%20fill='%23ffffff'%20opacity='0.11'%3E%26%239830;%3C/text%3E%3Ctext%20x='225'%20y='268'%20font-size='44'%20fill='%23ed1c24'%20opacity='0.18'%3E%26%239829;%3C/text%3E%3C/g%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20opacity='0.13'%3E%3Ccircle%20cx='245'%20cy='58'%20r='26'%20stroke-width='3'/%3E%3Ccircle%20cx='245'%20cy='58'%20r='15'%20stroke-width='2'%20stroke-dasharray='6%206'/%3E%3C/g%3E%3Cg%20fill='none'%20stroke='%23ed1c24'%20opacity='0.20'%3E%3Ccircle%20cx='95'%20cy='170'%20r='24'%20stroke-width='3'/%3E%3Ccircle%20cx='95'%20cy='170'%20r='14'%20stroke-width='2'%20stroke-dasharray='6%206'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 12% -5%, rgba(237, 28, 36, 0.14), transparent 42%),
        radial-gradient(circle at 88% 108%, rgba(237, 28, 36, 0.10), transparent 46%),
        linear-gradient(180deg, #0d0d10 0%, #08080a 100%);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat;
    background-size: 300px 300px, auto, auto, auto;
    background-attachment: fixed, fixed, fixed, fixed;
    background-position: 0 0, 0 0, 0 0, 0 0;
    animation: casinoDrift 120s linear infinite;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Yalnızca desen katmanı süzülür, parıltılar sabit kalır */
@keyframes casinoDrift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to   { background-position: 300px 600px, 0 0, 0 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
}

/* Navbar */
.navbar-dark {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand, .nav-link {
    color: var(--text-primary) !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent) !important;
}

/* Container */
.container {
    padding: 8px 5px;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .container {
        max-width: 600px;
        padding: 10px 20px;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 800px;
        padding: 15px 30px;
        margin: 0 auto;
    }
}

/* Banner Section */
.banner-section {
    margin: 10px 0;
}

.banner-group {
    margin-bottom: 10px;
}

@media (min-width: 769px) {
    .banner-section {
        margin: 6px 0;
    }
    
    .banner-group {
        margin-bottom: 6px;
    }
}

@media (min-width: 1200px) {
    .banner-section {
        margin: 8px 0;
    }
    
    .banner-group {
        margin-bottom: 8px;
    }
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 769px) {
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-width: 100%;
    }
}

@media (min-width: 1200px) {
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
    }
}

.banner-item {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
    position: relative;
    isolation: isolate;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

@media (min-width: 769px) {
    .banner-item {
        max-width: 100%;
        width: 100%;
    }
    
    .banner-item img {
        max-height: none;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

@media (min-width: 1200px) {
    .banner-item img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

.banner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(237, 28, 36, 0.25);
}

.banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

/* Bonus Cards Section */
.bonus-section {
    margin: 10px 0;
    padding: 0;
}

@media (min-width: 769px) {
    .bonus-section {
        margin: 6px 0;
    }
}

@media (min-width: 1200px) {
    .bonus-section {
        margin: 8px 0;
    }
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 769px) {
    .bonus-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        max-width: 100%;
        justify-items: center;
    }
}

@media (min-width: 1200px) {
    .bonus-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        max-width: 100%;
        justify-items: center;
    }
}

.bonus-card {
    width: 100%;
    height: auto;
    aspect-ratio: 150 / 195;
    margin: 0;
    position: relative;
    isolation: isolate;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    background: var(--bg-secondary);
    min-height: 0;
}

@media (min-width: 769px) {
    .bonus-card {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 150 / 195;
        height: auto;
    }
    
    .bonus-card img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

@media (min-width: 1200px) {
    .bonus-card {
        width: 100%;
        max-width: 100%;
    }
}

.bonus-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(237, 28, 36, 0.3);
}

/* 4 veya daha az bonus kart varsa daha büyük göster */
.bonus-section--few-cards .bonus-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bonus-section--few-cards .bonus-card {
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .bonus-section--few-cards .bonus-grid {
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .bonus-section--few-cards .bonus-grid {
        gap: 20px;
        max-width: 1000px;
    }
    
    .bonus-section--few-cards .bonus-card {
        max-width: 360px;
    }
}

.bonus-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: inherit;
}

/* Mobil için bonus kartları - 5 sütun (tüm mobil cihazlarda) */
@media (max-width: 768px) {
    .container {
        padding: 10px 8px;
    }
    
    .banner-group {
        margin-bottom: 15px;
    }
    
    .bonus-section {
        margin: 15px 0;
    }
    
    .banner-grid {
        gap: 8px;
    }
    
    .bonus-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 0;
        max-width: 100%;
    }
    
    .bonus-section--few-cards .bonus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 85%;
    }
    
    .bonus-section--few-cards .bonus-card {
        max-width: 140px;
    }
    
    .bonus-card {
        width: 100%;
        height: auto;
        aspect-ratio: 150 / 195;
        min-height: 0;
    }
    
    .bonus-card img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* Çok küçük ekranlar için de 5 sütun (mobilde her zaman 5 sütun) */
@media (max-width: 480px) {
    .bonus-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .bonus-section--few-cards .bonus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .container {
        padding: 8px 5px;
    }
}

/* Admin Panel Styles */
.admin-container {
    background-color: transparent;
    min-height: calc(100vh - 56px);
    padding: 30px 0;
}

.admin-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-card:hover {
    box-shadow: 0 4px 12px rgba(237, 28, 36, 0.2);
}

.admin-card h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Quick Cards */
.quick-card {
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(237, 28, 36, 0.3);
}

.quick-card-link {
    text-decoration: none;
    color: inherit;
}

.quick-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.quick-card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.quick-card h2 {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    color: var(--text-primary);
}

.quick-card .text-accent {
    color: var(--accent);
    font-weight: 600;
}

.gap-2 {
    gap: 0.5rem;
}

.form-control, .form-select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(237, 28, 36, 0.25);
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.table-dark {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.table-dark th {
    border-color: var(--border-color);
    color: var(--accent);
}

.table-dark td {
    border-color: var(--border-color);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-card h2 {
    color: var(--accent);
    text-align: center;
    margin-bottom: 30px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background-color: var(--bg-secondary);
    transition: border-color 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent);
}

.upload-area.dragover {
    border-color: var(--accent);
    background-color: var(--bg-tertiary);
}

/* Sortable */
.sortable-item {
    cursor: move;
    margin-bottom: 10px;
}

.sortable-item:hover {
    opacity: 0.8;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item-info {
    padding: 10px;
    background: var(--bg-tertiary);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive - Tablet ve küçük ekranlar */
@media (max-width: 992px) and (min-width: 769px) {
    .bonus-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .container {
        padding: 8px 5px;
    }
}

/* Responsive - Admin paneli mobil */
@media (max-width: 768px) {
    .admin-card {
        padding: 15px;
    }
    
    .quick-card-icon {
        font-size: 2rem;
    }
    
    .quick-card h2 {
        font-size: 1.5rem;
    }
}

/* Loading Spinner */
.spinner-border {
    color: var(--accent);
}

/* Alert */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: rgba(237, 28, 36, 0.2);
    color: var(--accent);
    border-left: 4px solid var(--accent);
}

/* 3. Grup Şablon Stilleri */
.template-section {
    margin: 20px 0;
}

.template-container {
    position: relative;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.template-background {
    width: 100%;
    height: auto;
    display: block;
}

.template-bonus-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.template-bonus-card {
    width: 150px;
    height: 195px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 5px;
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

.template-bonus-card:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.template-bonus-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(26, 26, 26, 0.8);
}

@media (max-width: 768px) {
    .template-bonus-overlay {
        gap: 5px;
        padding: 10px;
    }
    
    .template-bonus-card {
        width: 120px !important;
        height: 156px !important;
    }
    
    .bonus-section--few-cards.template-section .template-bonus-card {
        width: 160px !important;
        height: 208px !important;
    }
}

/* 4 veya daha az bonus kart – şablon modunda daha büyük kartlar */
.bonus-section--few-cards.template-section .template-bonus-card {
    width: 200px;
    height: 260px;
}

.bonus-section--few-cards.template-section .template-bonus-overlay {
    gap: 16px;
    padding: 24px;
}

/* =========================================================
   Banner & Bonus kartlarının etrafında dönen kırmızı-beyaz neon ışık
   ========================================================= */
@property --neon-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.banner-item::before,
.bonus-card::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    padding: 3px;
    background: conic-gradient(from var(--neon-angle),
        rgba(237, 28, 36, 0.12) 0deg,
        #ff5a60 38deg,
        #ed1c24 70deg,
        rgba(237, 28, 36, 0.12) 110deg,
        rgba(237, 28, 36, 0.12) 180deg,
        #ff6a3d 218deg,
        #e5121a 250deg,
        rgba(237, 28, 36, 0.12) 290deg,
        rgba(237, 28, 36, 0.12) 360deg);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    filter:
        drop-shadow(0 0 4px rgba(255, 60, 66, 0.95))
        drop-shadow(0 0 9px rgba(237, 28, 36, 0.8))
        drop-shadow(0 0 16px rgba(237, 28, 36, 0.5));
    animation: neonSpin 3.5s linear infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes neonSpin {
    to { --neon-angle: 360deg; }
}

/* Hareket azaltma tercihinde animasyonu durdur (neon çerçeve yine görünür) */
@media (prefers-reduced-motion: reduce) {
    .banner-item::before,
    .bonus-card::before {
        animation: none;
    }
}

