/**
 * Oyun Layout CSS
 * Grid formatında oyun kapakları
 * Başlık YOK
 */

.category-section.category-oyun-layout {
    padding: 10px 0 !important;
    background: #f5f5f5;
    margin-bottom: 0;
}

/* Kategori Başlığı - Cinema Layout ile aynı */
.oyun-section-header {
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.oyun-section-header::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--membership-primary, #e74c3c);
}

.oyun-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.oyun-section-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.oyun-section-title a:hover {
    color: var(--membership-primary, #e74c3c);
}

/* Grid Layout - 4 kolon */
.oyun-layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Oyun Kartı */
.oyun-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.oyun-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(231, 76, 60, 0.2);
    border-color: var(--membership-primary, #e74c3c);
}

.oyun-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Oyun Görseli */
.oyun-card-image {
    position: relative;
    width: 100%;
    padding-bottom: 140%; /* 5:7 aspect ratio (oyun kapağı oranı) */
    overflow: hidden;
    background: #f0f0f0;
}

.oyun-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.oyun-card:hover .oyun-card-image img {
    transform: scale(1.05);
}

/* Overlay */
.oyun-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.oyun-card:hover .oyun-overlay {
    opacity: 1;
}

/* IMDb Badge - Sağ Üst Köşe */
.oyun-imdb {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #000000;
    background-color: #FFD700;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Action Buttons */
.oyun-card-actions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 4;
}

.oyun-card:hover .oyun-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.oyun-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.oyun-action-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
    transform: translateY(-2px);
}

.oyun-action-btn svg {
    width: 14px;
    height: 14px;
}

.oyun-view-btn {
    flex: 1.5;
}

.oyun-view-count {
    font-size: 10px;
    font-weight: 700;
}

/* Oyun Content Area */
.oyun-card-content {
    padding: 14px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
}

/* Oyun Başlığı */
.oyun-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #2c3e50;
    margin: 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    transition: color 0.3s ease;
}

.oyun-card:hover .oyun-card-title {
    color: var(--membership-primary, #e74c3c);
}

/* ========================================
   OYUN SLIDER
   ======================================== */

.oyun-slider-wrapper {
    position: relative;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    max-width: 1400px;
}

.oyun-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.oyun-slider:active {
    cursor: grabbing;
}

.oyun-slider::-webkit-scrollbar {
    display: none;
}

.oyun-slide {
    flex: 0 0 calc(20% - 7px);
    min-width: 200px;
    max-width: calc(20% - 7px);
}

.oyun-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.oyun-slide-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Slider'da kare oran */
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.oyun-slide:hover .oyun-slide-image {
    transform: translateY(-4px);
}

.oyun-slide-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oyun-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 70%);
    z-index: 1;
}

.oyun-slide-imdb {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    color: #000000;
    background-color: #FFD700;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.oyun-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.oyun-slide-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: 8px;
}

.oyun-slide-date svg {
    width: 14px;
    height: 14px;
}

.oyun-slide-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.oyun-slide:hover .oyun-slide-title {
    color: #ffd700;
}

/* Slider Navigation - Dışarıda, kenarlarda */
.oyun-slider-prev,
.oyun-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.oyun-slider-prev {
    left: 10px;
}

.oyun-slider-next {
    right: 10px;
}

.oyun-slider-prev:hover,
.oyun-slider-next:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #fff;
    transform: translateY(-50%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.oyun-slider-prev svg,
.oyun-slider-next svg {
    width: 22px !important;
    height: 22px !important;
    pointer-events: none;
    display: block;
}

.oyun-slider-prev svg polyline,
.oyun-slider-next svg polyline {
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
    fill: none !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .oyun-layout-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .oyun-layout-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .oyun-card-content {
        padding: 12px;
    }
    
    .oyun-card-title {
        font-size: 13px;
        min-height: 40px;
    }
    
    .oyun-action-btn {
        padding: 6px;
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .category-section.category-oyun-layout {
        padding: 10px 0;
    }
    
    .oyun-layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .oyun-card {
        border-radius: 10px;
    }
    
    .oyun-card-image {
        padding-bottom: 100%; /* Mobilde kare oran (1:1) */
    }
    
    .oyun-imdb {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    /* Mobilde action butonlar her zaman göster */
    .oyun-card-actions {
        opacity: 1;
        transform: translateY(0);
        bottom: 8px;
        left: 8px;
        right: 8px;
        gap: 6px;
    }
    
    .oyun-action-btn {
        padding: 6px 4px;
        font-size: 9px;
        border-radius: 6px;
    }
    
    .oyun-action-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .oyun-view-count {
        font-size: 9px;
    }
    
    .oyun-card-content {
        padding: 8px;
    }
    
    .oyun-card-title {
        font-size: 11px;
        min-height: 35px;
        -webkit-line-clamp: 2;
    }
    
    /* Slider mobil optimizasyonu */
    .oyun-slider-wrapper {
        margin-top: 15px;
        padding: 15px 10px 20px 10px;
        border-radius: 12px;
    }
    
    .oyun-slider {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 0 35px;
        gap: 10px;
        grid-template-columns: none;
    }
    
    .oyun-slide {
        flex: 0 0 calc(60% - 5px);
        min-width: 180px;
        width: auto;
    }
    
    .oyun-slide-image {
        padding-bottom: 90%; /* Mobilde daha düz */
        border-radius: 10px;
    }
    
    .oyun-slide-imdb {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .oyun-slide-content {
        padding: 10px;
    }
    
    .oyun-slide-date {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .oyun-slide-title {
        font-size: 12px;
    }
    
    /* Mobilde butonları küçült */
    .oyun-slider-prev,
    .oyun-slider-next {
        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;
        border-width: 1px;
        font-size: 20px;
        font-weight: bold;
        line-height: 1;
    }
    
    .oyun-slider-prev {
        left: 5px;
    }
    
    .oyun-slider-next {
        right: 5px;
    }
    
    /* Mobilde SVG yerine text kullan */
    .oyun-slider-prev svg,
    .oyun-slider-next svg {
        display: none;
    }
    
    .oyun-slider-prev::before {
        content: '<';
    }
    
    .oyun-slider-next::before {
        content: '>';
    }
}

@media (max-width: 480px) {
    .oyun-layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .oyun-card {
        border-radius: 8px;
    }
    
    .oyun-card-image {
        padding-bottom: 90%; /* 480px'de geniş dikdörtgen */
    }
    
    .oyun-imdb {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 5px;
    }
    
    .oyun-card-actions {
        bottom: 6px;
        left: 6px;
        right: 6px;
        gap: 4px;
    }
    
    .oyun-action-btn {
        padding: 5px 3px;
        font-size: 8px;
        border-radius: 5px;
    }
    
    .oyun-action-btn svg {
        width: 10px;
        height: 10px;
    }
    
    .oyun-view-count {
        font-size: 8px;
    }
    
    .oyun-card-content {
        padding: 6px;
    }
    
    .oyun-card-title {
        font-size: 10px;
        min-height: 32px;
    }
    
    /* Slider 480px */
    .oyun-slider-wrapper {
        padding: 12px 8px 15px 8px;
        border-radius: 10px;
    }
    
    .oyun-slider {
        display: flex;
        overflow-x: auto;
        padding: 0 30px;
        gap: 8px;
        grid-template-columns: none;
    }
    
    .oyun-slide {
        flex: 0 0 calc(75% - 4px);
        min-width: 150px;
        width: auto;
    }
    
    .oyun-slide-image {
        padding-bottom: 85%; /* 480px'de çok düz */
        border-radius: 8px;
    }
    
    .oyun-slide-imdb {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 5px;
    }
    
    .oyun-slide-content {
        padding: 8px;
    }
    
    .oyun-slide-date {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .oyun-slide-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    
    /* 480px'de butonları biraz daha küçült */
    .oyun-slider-prev,
    .oyun-slider-next {
        width: 24px;
        height: 24px;
        min-width: 24px;
        max-width: 24px;
        font-size: 18px;
    }
    
    .oyun-slider-prev {
        left: 3px;
    }
    
    .oyun-slider-next {
        right: 3px;
    }
}

@media (max-width: 480px) {
    .oyun-section-header {
        margin-bottom: 10px;
        gap: 10px;
    }
    
    .oyun-section-header::after {
        display: block;
    }
    
    .oyun-section-title {
        font-size: 18px;
    }
}

/* ========================================
   DARK MODE
   ======================================== */

/* Carousel slider pattern: transparent section, #1a1a1a cards */
body.dark-mode .category-section.category-oyun-layout {
    background: transparent;
}

/* Kategori Başlığı Dark Mode */
body.dark-mode .oyun-section-header::after {
    background: var(--membership-primary, #e74c3c);
}

body.dark-mode .oyun-section-title {
    color: #ffffff !important;
}

body.dark-mode .oyun-section-title a {
    color: #ffffff !important;
}

body.dark-mode .oyun-section-title a:hover {
    color: var(--membership-primary, #e74c3c) !important;
}

body.dark-mode .oyun-card {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .oyun-card-image {
    background: var(--dark-bg-tertiary);
}

body.dark-mode .oyun-card:hover {
    border-color: var(--dark-accent);
}

body.dark-mode .oyun-card-content {
    background: #1a1a1a;
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* Icon style override for Oyun layout */
.category-oyun-layout .favorite-button.favorite-style-icon,
.category-oyun-layout .like-icon {
    color: #ffffff !important;
}

.category-oyun-layout .favorite-button.favorite-style-icon svg,
.category-oyun-layout .like-icon svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

body.dark-mode .oyun-card-title {
    color: var(--dark-text-primary);
}

body.dark-mode .oyun-card:hover .oyun-card-title {
    color: var(--dark-accent);
}

body.dark-mode .oyun-slider-wrapper {
    background: #1a1a1a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .oyun-action-btn {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .oyun-action-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
}