/* ============================================
   CYBERPUNK HEADER - Dark Gaming Theme
   ============================================ */

/* Glassmorphism Header - Dark Theme */
header.header-custom {
    position: sticky;
    top: 20px;
    width: 90%;
    margin: 0 auto;
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 16px;
    /* Dark Glass Effect */
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
}

/* Animated Border Glow */
header.header-custom::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(90deg,
            rgba(0, 212, 255, 0.3),
            rgba(188, 19, 254, 0.3),
            rgba(255, 0, 255, 0.3),
            rgba(0, 212, 255, 0.3));
    background-size: 300% 100%;
    border-radius: 17px;
    z-index: -1;
    animation: gradient-shift 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

header.header-custom:hover::before {
    opacity: 1;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Logo */
header.header-custom .header-logo {
    flex-shrink: 0;
    position: relative;
}

header.header-custom .header-logo img {
    height: clamp(40px, 4.2vw, 58px);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

header.header-custom .header-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
}

/* Navigation Links */
header.header-custom .header-nav {
    display: flex;
    gap: clamp(10px, 1.5vw, 25px);
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    flex-wrap: nowrap;
}

header.header-custom .header-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: clamp(13px, 1.2vw, 15px);
    /* Giảm max-size một chút */
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

header.header-custom .header-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #00d4ff, #bc13fe, #ff00ff);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px currentColor;
}

header.header-custom .header-nav a:hover {
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

header.header-custom .header-nav a:hover::after,
header.header-custom .header-nav a.active::after {
    width: 100%;
}

header.header-custom .header-nav a.active {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* User Actions */
header.header-custom .header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* Group for Search, Cart, Notify */
.header-utils-group {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Các icon sát nhau hơn */
}

/* Group for User Info & Logout */
.header-user-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 2px 2px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Neon Buttons */
.btn-glass {
    padding: clamp(5px, 0.6vw, 8px) clamp(10px, 1.2vw, 16px);
    border-radius: 50px;
    font-weight: 600;
    font-size: clamp(10px, 0.9vw, 12px);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 8px);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-glass-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #bc13fe 100%);
    color: white;
    box-shadow:
        0 4px 15px rgba(0, 212, 255, 0.4),
        0 0 20px rgba(188, 19, 254, 0.2);
}

.btn-glass-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: none;
}

.btn-glass-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 25px rgba(0, 212, 255, 0.5),
        0 0 30px rgba(188, 19, 254, 0.4);
    color: white;
}

.btn-glass-primary:hover::before {
    animation: shine 0.6s ease forwards;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.btn-glass-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-glass-secondary:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

/* User Profile Display */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 212, 255, 0.1);
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    font-weight: 600;
    font-size: clamp(11px, 1vw, 13px);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-user-info:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

.header-user-info i {
    font-size: 16px;
    flex-shrink: 0;
}

.header-user-info .balance {
    color: #39ff14;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

/* Header Icons (Cart, Notification) */
.header-cart-icon,
.header-notification-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #00d4ff !important;
    margin-right: 15px !important;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.header-cart-icon:hover,
.header-notification-bell:hover {
    color: #5ee7ff !important;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}

.header-cart-icon i,
.header-notification-bell i {
    font-size: clamp(1.3rem, 1.5vw, 1.6rem) !important;
}

.header-cart-icon .badge,
.header-notification-bell .badge {
    font-size: clamp(0.5rem, 0.6vw, 0.6rem) !important;
    padding: 2px 5px !important;
    background: linear-gradient(135deg, #ff00ff, #bc13fe) !important;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Logout Button Responsive */
/* Logout Button specifics */
.header-actions .btn-glass-logout {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: rgba(255, 51, 102, 0.2) !important;
    border: 1px solid rgba(255, 51, 102, 0.4) !important;
    color: #ff3366 !important;
    transition: all 0.3s ease;
}

.header-actions .btn-glass-logout:hover {
    background: rgba(255, 51, 102, 0.3) !important;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
}

.header-actions form button.btn-glass:hover {
    background: rgba(255, 51, 102, 0.3) !important;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

/* Responsive */
@media (max-width: 992px) {
    header.header-custom {
        width: 100%;
        top: 0;
        border-radius: 0;
        padding: 12px 15px;
        margin: 0;
    }

    header.header-custom .header-logo {
        display: block;
    }

    header.header-custom .header-logo img {
        height: 42px;
    }

    header.header-custom .header-nav {
        display: none;
    }

    .header-user-info {
        display: none !important;
    }

    .header-actions form {
        display: none !important;
    }

    .header-auth-buttons {
        display: none !important;
    }

    header.header-custom .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
        font-size: 26px;
        margin: 0;
    }

    .header-search-btn {
        font-size: 22px !important;
        margin: 0 8px 0 0 !important;
    }

    .header-cart-icon i,
    .header-notification-bell i {
        font-size: 22px !important;
    }

    .header-cart-icon,
    .header-notification-bell {
        margin: 0 !important;
    }

    .header-cart-icon .badge,
    .header-notification-bell .badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
        min-width: 16px;
        height: 16px;
    }
}

/* ========================================
   SEARCH FEATURE STYLES - Dark Theme
   ======================================== */

.header-search-btn {
    background: none;
    border: none;
    color: #00d4ff;
    font-size: clamp(1.3rem, 1.5vw, 1.6rem);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    margin-right: 25px;
    margin-left: 20px;
}

.header-search-btn:hover {
    color: #5ee7ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1050;
    backdrop-filter: blur(8px);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search Panel - Dark Theme */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 80vh;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 212, 255, 0.1);
    z-index: 1100;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.search-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-panel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Search Input - Dark Theme */
.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #00d4ff;
    font-size: 1.2rem;
}

.search-input {
    width: 100%;
    padding: 18px 60px;
    font-size: 1.1rem;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    background: rgba(26, 26, 46, 0.8);
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
    border-color: #00d4ff;
    box-shadow:
        0 4px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 212, 255, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 51, 102, 0.2);
    color: #ff3366;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close-btn:hover {
    background: rgba(255, 51, 102, 0.3);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

/* Search Filters - Dark Theme */
.search-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-filter-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 46, 0.6);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-filter-btn:hover {
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.search-filter-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #bc13fe 100%);
    border-color: transparent;
    color: white;
    box-shadow:
        0 4px 15px rgba(0, 212, 255, 0.4),
        0 0 20px rgba(188, 19, 254, 0.2);
}

/* Search Results - Dark Theme */
.search-results {
    min-height: 200px;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #00d4ff;
    font-size: 1rem;
}

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.search-no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #00d4ff;
}

.search-no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Search Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.search-result-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-type {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    color: white;
}

.search-result-type.game {
    background: linear-gradient(135deg, #00d4ff, #bc13fe);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.search-result-type.random {
    background: linear-gradient(135deg, #ff00ff, #ff3366);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.search-result-name {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-category {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.search-result-special {
    font-size: 0.95rem;
    color: #00d4ff;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #39ff14;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* Search Panel Responsive */
@media (max-width: 768px) {
    .search-panel-container {
        padding: 20px 15px;
    }

    .search-input {
        padding: 15px 50px;
        font-size: 1rem;
    }

    .search-input-icon {
        left: 15px;
        font-size: 1rem;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .search-result-item {
        padding: 12px;
    }

    .search-result-thumb {
        width: 70px;
        height: 70px;
    }

    .search-filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

/* Search Result Details Badges - Dark Theme */
.search-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0;
}

.search-detail-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    white-space: nowrap;
}

.search-result-item:hover .search-detail-badge {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

/* Search Placeholder - No results yet */
.search-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.search-placeholder i {
    font-size: 4rem;
    color: #00d4ff;
    opacity: 0.5;
    margin-bottom: 20px;
}

.search-placeholder h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.search-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.search-placeholder ul {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}

.search-placeholder ul li {
    font-size: 1rem;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
}

.search-placeholder ul li strong {
    color: #00d4ff;
}

/* Search Result Item - Updated Structure */
.search-result-item {
    display: flex;
    flex-direction: column;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
}

.search-result-link {
    display: flex;
    gap: 15px;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}

/* Search Result Meta */
.search-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.search-game-type {
    font-size: 0.85rem;
    color: #bc13fe;
    font-weight: 600;
}

/* Matched Fields - Highlighted */
.search-matched-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.search-matched-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.2), rgba(0, 212, 255, 0.2));
    color: #39ff14;
    border-radius: 12px;
    border: 1px solid rgba(57, 255, 20, 0.5);
    animation: pulse-matched 2s infinite;
}

.search-matched-badge i {
    color: #39ff14;
    font-size: 0.85rem;
}

@keyframes pulse-matched {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(57, 255, 20, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
    }
}

/* Detail Badge - Matched variant */
.search-detail-badge.matched {
    background: rgba(57, 255, 20, 0.15);
    color: #39ff14;
    border-color: rgba(57, 255, 20, 0.4);
}

/* Search Result Actions */
.search-result-actions {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-end;
}

.search-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.search-action-btn.cart-btn {
    background: rgba(57, 255, 20, 0.2);
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.4);
}

.search-action-btn.cart-btn:hover {
    background: rgba(57, 255, 20, 0.3);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.search-action-btn.view-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #bc13fe 100%);
    color: white;
    border: none;
}

.search-action-btn.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.search-action-btn.buy-btn {
    background: linear-gradient(135deg, #ff6600 0%, #ff0066 100%);
    color: white;
    border: none;
}

.search-action-btn.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

/* Mobile responsiveness for search actions */
@media (max-width: 768px) {
    .search-result-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-action-btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .search-placeholder ul li {
        font-size: 0.9rem;
    }
}

/* Blog Post Search Results */
.search-result-type.post {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

.search-result-item.post-item {
    border-left: 3px solid #ff6b6b;
}

.search-result-excerpt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-action-btn.post-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
}

.search-action-btn.post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}