/* Header CSS - Modern Style */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top Bar */
.top-bar {
    background: #252836;
    padding: 4px
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .left-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar .left-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: "Roboto", sans-serif;
}

.top-bar .left-menu a:hover {
    color: #70acfc;
}

.top-bar .social-icons {
    display: flex;
    gap: 15px;
}

.top-bar .social-icons a {
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.top-bar .social-icons a:hover {
    color: #fff;
    background: linear-gradient(350deg, #567ec6, #309fd9);
    transform: translateY(-3px);
}

/* Main Header */
.main-header {
    background-color: #2d3142;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .logo {
    max-width: 180px;
}

.main-header .logo img {
    width: 100%;
    height: auto;
}

.main-header .search-form {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.main-header .search-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 4px;
    border: none;
    background-color: #252836;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-header .search-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(112, 172, 252, 0.5);
}

.main-header .search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.main-header .search-form button:hover {
    color: #70acfc;
}

.main-header .user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-header .user-actions .user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: rgba(30, 33, 48, 0.5);
}

.main-header .user-actions .user-btn span {
    display: inline-block;
}

.main-header .user-actions .user-btn small {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.main-header .user-actions .user-btn:hover {
    background-color: #1e2130;
    color: #70acfc;
}

/* Navigation Menu */
.nav-menu {
    background-color: #2d3142;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-menu .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    position: relative;
}

.nav-menu ul li a {
    display: flex;
    align-items: center;
    color: #d9dae5;
    text-decoration: none;
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Roboto", sans-serif;
    line-height: 1;
}

.nav-menu ul li a i {
    margin-right: 8px;
    font-size: 15px;
    display: inline-block;
    text-align: center;
    width: 16px;
    height: 16px;
}

.nav-menu ul li a span {
    display: inline-block;
}

.nav-menu ul li a:hover {
    background-color: rgb(29 33 45);
}

.nav-menu .all-games {
    background-color: #70acfc;
}

.nav-menu .all-games a {
    font-weight: 600;
    color: #fff;
}

.nav-menu .all-games a:hover {
    background-color: #5e56c6;
    color: #fff;
}

/* Basket Area */
.nav-menu .basket-area {
    position: relative;
    z-index: 99;
}

.nav-menu .basket-area .cart-btn {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(350deg, #567ec6, #309fd9);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.nav-menu .basket-area .cart-btn:hover {
    filter: brightness(1.1);
}

.nav-menu .basket-area .cart-btn i {
    margin-right: 8px;
    font-size: 15px;
    display: inline-block;
    text-align: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.nav-menu .basket-area .cart-btn span {
    display: inline-block;
    line-height: 1;
}

.nav-menu .basket-area .cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff5e5e;
    color: #fff;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu .basket-area .main-container {
    position: relative;
}

.nav-menu .basket-area .basket-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background-color: #252836;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    display: none;
    margin-top: 10px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.nav-menu .basket-area:hover .basket-container,
.nav-menu .basket-area .basket-container:hover {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Önemli: Sepet içeriğinin üzerine gelince kapanmaması için */
.nav-menu .basket-area .basket-container:hover {
    display: block;
}

/* Sepet butonu ile popup arasında görünmez bir köprü oluştur */
.nav-menu .basket-area:after {
    content: '';
    position: absolute;
    height: 20px;
    width: 100%;
    bottom: -20px;
    left: 0;
    z-index: 99;
}

.nav-menu .basket-area .basket-container:before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #252836;
}

.nav-menu .basket-area .basket-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    display: block;
}

.nav-menu .basket-area .basket-container ul li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-menu .basket-area .basket-container ul li:last-child {
    border-bottom: none;
}

.nav-menu .basket-area .basket-container ul li img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.nav-menu .basket-area .basket-container ul li .text {
    flex: 1;
    overflow: hidden;
}

.nav-menu .basket-area .basket-container ul li .text span {
    display: block;
    font-size: 14px;
    margin: 0 0 5px;
    color: #fff;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.nav-menu .basket-area .basket-container ul li .text p {
    font-size: 12px;
    margin: 0;
    color: #ccc;
}

.nav-menu .basket-area .basket-container ul li .text b {
    display: block;
    font-size: 14px;
    color: #70acfc;
    margin-top: 5px;
}

.nav-menu .basket-area .basket-container ul li .right {
    margin-left: 5px;
}

.nav-menu .basket-area .basket-container ul li .right a {
    color: #ff5e5e;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: all 0.3s ease;
}

.nav-menu .basket-area .basket-container ul li .right a:hover {
    opacity: 0.8;
}

.nav-menu .basket-area .basket-container ul li .right a i {
    font-size: 16px;
    margin-right: 0;
}

.nav-menu .basket-area .basket-container .text-center {
    text-align: center;
    color: #fff;
}

.nav-menu .basket-area .basket-container .basket-footer {
}

.nav-menu .basket-area .basket-container .checkout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(350deg, #567ec6, #309fd9);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu .basket-area .basket-container .checkout-btn:hover {
    filter: brightness(1.1);
}

/* Sepet boş durumu için stil */
.nav-menu .basket-area .basket-container .empty-cart {
    text-align: center;
    padding: 20px 0;
    color: #ccc;
}

.nav-menu .basket-area .basket-container .row {
    margin: 0;
}

.nav-menu .basket-area .basket-container .col-12 {
    padding: 10px;
}

.nav-menu .basket-area .basket-container h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 10px;
}

.nav-menu .basket-area .basket-container p {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 15px;
}

.nav-menu .basket-area .basket-container .btn-success {
    background: linear-gradient(350deg, #567ec6, #309fd9);
    border: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0 auto;
}

.nav-menu .basket-area .basket-container .btn-success:hover {
    filter: brightness(1.1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    min-width: 160px;
    background-color: #1e2130;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: flex !important;
    align-items: center !important;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-content a i {
    margin-right: 8px;
    font-size: 15px;
    display: inline-block;
    text-align: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.dropdown-content a span {
    display: inline-block;
    line-height: 1;
}

.dropdown-content a:hover {
    background-color: #70acfc;
    color: #fff;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 5px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .ball {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1e2130;
    transition: .4s;
    border-radius: 34px;
}

.switch .ball:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch .ball {
    background-color: #70acfc;
}

input:checked + .switch .ball:before {
    transform: translateX(20px);
}

.switch .fa-sun, .switch .fa-moon {
    position: absolute;
    top: 3px;
    font-size: 12px;
    z-index: 1;
}

.switch .fa-sun {
    left: 5px;
    color: #f39c12;
}

.switch .fa-moon {
    right: 5px;
    color: #f1c40f;
}

.mobileSidebar {
    background-color: #252836;
    z-index: 99999;
}

.mobileSidebar .left-side a {
    background-color: rgba(30, 33, 48, 0.5);
}

.mobileSidebar .left-side a:hover {
    background-color: #202132;
    box-shadow: none;
    height: auto!important;
}

section.games .games-breadcrumb a:hover, section.games .games-breadcrumb a.active {
    color: #70acfc;
}

section.home-tabe .tab-containermain {
    width: 100%;
}

/* Responsive */
@media (max-width: 991px) {
    .main-header .search-form {
        max-width: 300px;
    }
    
    .nav-menu ul li a {
        padding: 15px 10px;
        font-size: 13px;
    }
    
    .main-header .user-actions .user-btn span {
        display: none;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    /* Web header'ı gizle, mobil header'ı göster */
    .web-header {
        display: none;
    }
    
    .mobile-header-wrapper {
        display: block;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header {
        padding: 10px 0;
    }
    
    .main-header .container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .main-header .logo {
        margin-right: 0;
    }
    
    .main-header .logo img {
        max-width: 150px;
    }
    
    .main-header .search-form {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-header .user-actions {
        display: none;
    }
    
    .mobileSidebar {
        display: block;
    }
    
    body {
        padding-bottom: 60px;
    }
}

/* Mobil Header Stilleri */
.mobile-header-wrapper {
    display: none; /* Varsayılan olarak gizli */
    background-color: #2d3142;
}

.mobile-header {
    padding: 10px;
    position: relative;
}

.mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-top-menu {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
}

.mobile-top-menu a {
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

.mobile-social-icons {
    display: flex;
    gap: 10px;
}

.mobile-social-icons a {
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-social-icons a:hover {
    color: #fff;
    background: linear-gradient(350deg, #567ec6, #70acfc);
    transform: translateY(-3px);
}

.mobile-logo {
    text-align: center;
    padding: 15px 0;
}

.mobile-logo img {
    max-width: 250px;
    height: auto;
}

.mobile-search {
    margin: 10px 0;
    position: relative;
}

.mobile-search-form {
    display: flex;
    position: relative;
}

.mobile-search-form input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 4px;
    border: none;
    background-color: #252836;
    color: #fff;
}

.mobile-search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
}

.mobileSidebar {
    background-color: #252836;
}

.mobileSidebar .left-side a {
    background-color: rgba(30, 33, 48, 0.5);
}

.mobileSidebar .left-side a:hover {
    background-color: #202132;
    box-shadow: none;
    height: auto!important;
}

/* Responsive */
@media (max-width: 991px) {
    .main-header .search-form {
        max-width: 300px;
    }
    
    .nav-menu ul li a {
        padding: 15px 10px;
    }
    
    .main-header .user-actions .user-btn span {
        display: none;
    }
}

@media (max-width: 767px) {
    /* Web header'ı gizle, mobil header'ı göster */
    .web-header {
        display: none;
    }
    
    .mobile-header-wrapper {
        display: block;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header {
        padding: 10px 0;
    }
    
    .main-header .container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .main-header .logo {
        margin-right: 0;
    }
    
    .main-header .logo img {
        max-width: 150px;
    }
    
    .main-header .search-form {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-header .user-actions {
        display: none;
    }
    
    .mobileSidebar {
        display: block;
    }
    
    body {
        padding-bottom: 60px;
    }

    .mobile-header {
        position: relative;
    }

    .mobile-search {
        position: relative;
    }

    .mobile-search-form {
        position: relative;
    }
}

/* Arama Sonuçları Dropdown Stilleri */
.autocomplete-suggestions {
    position: absolute;
    z-index: 9999;
    width: auto !important;
    min-width: 300px;
    max-width: 500px;
    max-height: 400px !important;
    overflow-y: auto !important;
    background: #252836;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
    display: none;
}

.autocomplete-suggestions::-webkit-scrollbar {
    background: #1e1f26;
    width: 4px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #383b50;
    border-radius: 0;
}

/* Sonuçlar varken göster */
.autocomplete-suggestions:not(:empty) {
    display: block;
}

.autocomplete-suggestion {
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    background-color: #1e2130;
    width: 100%;
}

.autocomplete-suggestion:last-child {
    margin-bottom: 0;
}

.autocomplete-suggestion:hover {
    background-color: #2f3446;
}

.autocomplete-selected {
    background-color: #2f3446;
}

/* Yeni Arama Sonuçları Stilleri */
.search-result-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none !important;
}

.search-item-image {
    min-width: 32px;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2f3446;
    border-radius: 6px;
    overflow: hidden;
}

.search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #70acfc;
    font-size: 14px;
}

.search-item-details {
    flex: 1;
    min-width: 0; /* Önemli: Bu, text-overflow'un çalışması için gerekli */
    width: 100%;
}

.search-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    width: 100%;
    display: block;
}

.search-item-price {
    color: #70acfc;
    font-weight: 600;
    font-size: 12px;
    margin-top: 2px;
}

/* Mobil Arama Sonuçları için Özel Stiller */
@media (max-width: 767px) {
    .mobile-header-wrapper {
        position: relative;
        z-index: 999;
    }

    .mobile-header {
        position: relative;
    }

    .mobile-search {
        position: relative;
    }

    .mobile-search-form {
        position: relative;
    }

    .autocomplete-suggestions {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-height: 300px !important;
        margin: 0 !important;
        border-radius: 8px;
        padding: 8px;
        background-color: #252836 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        overflow-y: auto !important;
    }

    .autocomplete-suggestion {
        padding: 8px;
        margin-bottom: 4px;
    }
    
    .search-item-image {
        min-width: 36px;
        width: 36px;
        height: 36px;
    }
    
    .search-item-name {
        font-size: 13px;
    }
    
    .search-item-price {
        font-size: 12px;
    }
}

@media (max-width: 330px) {
    .mobile-social-icons {
        display: none;
    }
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* Dropdown menü için de aynı stil */
.dropdown a {
    display: flex !important;
    align-items: center !important;
    line-height: 1;
}

.dropdown a i {
    margin-right: 8px;
    font-size: 15px;
    display: inline-block;
    text-align: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.dropdown a span {
    display: inline-block;
    line-height: 1;
}