/**
 * Oyunlar Modülü - Frontend CSS
 * Tab Yapısı ile Şık ve Profesyonel Tasarım
 */

.gm-games-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gm-games-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 50px;
}

.gm-games-header h1 {
    font-size: 2.2em;
    margin-bottom: 12px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gm-description {
    font-size: 1em;
    color: #666;
    margin: 0;
}

.gm-no-games {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 1.1em;
}

/* Tab Navigation - Kizi.com Game Series Birebir CSS */
.gm-tabs-nav {
    padding: 0.75rem 1rem 0;
    margin: 0 0 1rem 0;
    border-radius: 0;
    display: inline-flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    justify-content: center;
    flex-flow: row wrap;
    list-style: none;
    text-transform: uppercase;
    width: 100%;
    gap: 16px;
}

.gm-series-item {
    width: 320px;
    min-width: 280px;
    min-height: 90px;
}

.gm-tab-button {
    display: flex;
    display: -ms-flexbox;
    -ms-flex-wrap: wrap;
    flex-wrap: nowrap;
    color: #fff;
    position: relative;
    background: #4a90e2;
    z-index: 0;
    min-height: 90px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    width: 100%;
}

.gm-tab-button:hover {
    background: #5aa0f2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.gm-tab-button.active {
    background: #3a7bc8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gm-tab-icon-img {
    height: 70px;
    width: auto;
    vertical-align: initial;
    margin-left: 14px;
    margin-top: auto;
    margin-bottom: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

.gm-tab-icon-img.float-left {
    float: left;
}

.gm-tab-text {
    white-space: normal;
    flex: 1;
    margin: auto 12px;
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 0 8px;
}

/* Sağdaki yamuk yeşil arka plan + küçük beyaz ok - Görseldeki gibi */
.gm-tab-arrow {
    flex-shrink: 0;
    position: relative;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.gm-tab-arrow-body {
    position: relative;
    width: 100%;
    height: 100%;
    background: #4ade80;
    border-radius: 0 12px 12px 0;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gm-chevron {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

.gm-tab-button::after {
    content: '';
    display: table;
    clear: both;
}

/* Tab Content */
.gm-tabs-content {
    position: relative;
    min-height: 400px;
}

.gm-tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.gm-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gm-no-games-in-tab {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1em;
}

/* Games Grid */
.gm-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gm-game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gm-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #2271b1;
}

/* Başlık olmayan kartlar için sade tasarım */
.gm-game-card.gm-no-title {
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.gm-game-card.gm-no-title:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.gm-game-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8f 100%);
    color: #fff;
    position: relative;
}

.gm-game-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.gm-game-title {
    margin: 0;
    font-size: 0.95em;
    font-weight: 600;
    color: #fff !important;
    line-height: 1.4;
}

.gm-game-content {
    padding: 18px;
    background: #fafafa;
}

/* Başlık olmayan kartlarda padding'i azalt */
.gm-game-card.gm-no-title .gm-game-content {
    padding: 12px;
    background: #fff;
}

.gm-game-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 76%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Başlık olmayan kartlarda iframe wrapper daha sade */
.gm-game-card.gm-no-title .gm-game-iframe-wrapper {
    border-radius: 6px;
    background: #f8f8f8;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.gm-game-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Sadece en alttaki "Pe platforma Wordwall" banner'ını gizle ve link tıklamalarını engelle */
.gm-game-iframe-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #fafafa;
    z-index: 10;
    pointer-events: auto;
    border-radius: 0 0 8px 8px;
    cursor: default;
}

.gm-no-iframe {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9em;
}

.gm-game-link-wrapper {
    text-align: center;
    padding: 10px;
}

.gm-game-link-wrapper a {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.gm-game-link-wrapper a:hover {
    transform: scale(1.02);
}

.gm-game-link-wrapper img {
    display: block;
    margin: 0 auto 8px;
    border-radius: 6px;
    max-width: 100%;
    height: auto;
}

.gm-game-link-wrapper span {
    display: block;
    color: #2271b1;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 8px;
}

/* Tablet */
@media (max-width: 1024px) {
    .gm-games-container {
        padding: 30px 15px;
    }
    
    .gm-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .gm-tabs-nav {
        gap: 12px;
    }
    
    .gm-series-item {
        width: 280px;
        min-width: 260px;
        min-height: 85px;
    }
    
    .gm-tab-button {
        min-height: 85px;
    }
    
    .gm-tab-icon-img {
        height: 65px;
        margin-left: 12px;
    }
    
    .gm-tab-text {
        font-size: 16px;
        margin: auto 10px;
    }
    
    .gm-tab-arrow {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .gm-tab-arrow-body {
        clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
    }
    
    .gm-chevron {
        width: 12px;
        height: 12px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gm-games-container {
        padding: 20px 15px;
    }
    
    .gm-games-header {
        margin-bottom: 30px;
    }
    
    .gm-games-header h1 {
        font-size: 1.7em;
    }
    
    .gm-tabs-nav {
        flex-direction: column;
        gap: 14px;
        padding: 0.5rem;
    }
    
    .gm-series-item {
        width: 100%;
        min-width: 100%;
        display: block;
        min-height: 85px;
    }
    
    .gm-tab-button {
        width: 100%;
        min-height: 85px;
    }
    
    .gm-tab-icon-img {
        height: 65px;
        margin-left: 12px;
    }
    
    .gm-tab-text {
        font-size: 16px;
        margin: auto 10px;
    }
    
    .gm-tab-arrow {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .gm-tab-arrow-body {
        clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
    }
    
    .gm-chevron {
        width: 12px;
        height: 12px;
    }
    
    .gm-games-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .gm-game-content {
        padding: 14px;
    }
}
