/* ============================================================
   COMMON.CSS — Shared styles for Sportstify (index + articles)
   ============================================================ */

/* ============ CSS VARIABLES ============ */
:root {
    --primary: #0a0f1e;
    --accent: #e8192c;
    --accent2: #ff6b00;
    --gold: #f5c518;
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface2: #eef0f4;
    --border: #dde1e8;
    --text: #111827;
    --text2: #4b5563;
    --text3: #9ca3af;
    --nav-h: 64px;
    --ticker-h: 36px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.07);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.13);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Light theme: navy-slate navbar & footer */
    --nav-bg: #1c2333;
    --nav-border-color: rgba(255, 255, 255, 0.06);
    --footer-bg: #1a2236;
    --footer-divider: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] {
    --bg: #0d1117;
    --surface: #161b22;
    --surface2: #21262d;
    --border: #30363d;
    --text: #e6edf3;
    --text2: #8b949e;
    --text3: #484f58;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    /* Dark theme: original deep-space black */
    --nav-bg: #0a0f1e;
    --nav-border-color: rgba(255, 255, 255, 0.04);
    --footer-bg: #0a0f1e;
    --footer-divider: rgba(255, 255, 255, 0.08);
}

/* ============ RESET ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: "DM Sans", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ============ UTILITIES ============ */
.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 24px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.badge-red    { background: var(--accent); color: #fff; }
.badge-orange { background: var(--accent2); color: #fff; }
.badge-blue   { background: #1d4ed8; color: #fff; }
.badge-green  { background: #16a34a; color: #fff; }
.badge-purple { background: #7c3aed; color: #fff; }
.badge-cyan   { background: #0891b2; color: #fff; }
.badge-gold   { background: var(--gold); color: #000; }

.badge-live {
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-img { position: relative; overflow: hidden; }
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-img img { transform: scale(1.05); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c7152a; transform: translateY(-1px); }
.btn-outline { border: 2px solid rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.15); }

/* ============ TICKER ============ */
.ticker-bar {
    background: var(--accent);
    color: #fff;
    height: var(--ticker-h);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1001;
}
.ticker-label {
    background: var(--primary);
    padding: 0 18px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ticker-label i { font-size: 10px; }
.ticker-wrap { overflow: hidden; flex: 1; position: relative; }
.ticker-content {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    animation: ticker 35s linear infinite;
    font-size: 13px;
    font-weight: 500;
}
.ticker-content span { padding-right: 60px; }
.ticker-content span::after { content: "•"; margin-left: 60px; opacity: 0.5; }
@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ NAVBAR ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: box-shadow var(--transition), background var(--transition);
    border-bottom: 1px solid var(--nav-border-color);
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4); }

.nav-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Oswald", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.logo-text span { color: var(--accent); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}
.nav-menu > a,
.nav-more-btn {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 11px;
    border-radius: 6px;
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "DM Sans", sans-serif;
}
.nav-menu > a:hover,
.nav-menu > a.active,
.nav-more-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.nav-menu > a.active { position: relative; }
.nav-menu > a.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 5px;
    flex-shrink: 0;
}
.nav-utility { color: rgba(255, 255, 255, 0.6) !important; font-size: 13px !important; }
.nav-utility:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08) !important; }

.nav-more-wrapper { position: relative; }
.nav-more-btn i { font-size: 11px; transition: transform var(--transition); }
.nav-more-wrapper.open .nav-more-btn i { transform: rotate(180deg); }

/* ============ MORE DROPDOWN ============ */
.more-dropdown {
    position: fixed;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 32px));
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    padding: 24px;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    z-index: 999;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.more-dropdown.show { display: grid; }

.more-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    color: var(--text);
}
.more-cat-item:hover { background: var(--surface2); color: var(--accent); }
.more-cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 14px;
    flex-shrink: 0;
}
.more-cat-item span { font-size: 13px; font-weight: 600; }
.more-cat-item small { display: block; font-size: 11px; color: var(--text3); font-weight: 400; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
    font-size: 15px;
    flex-shrink: 0;
}
.nav-icon-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============ MOBILE MENU ============ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--nav-bg);
    z-index: 2000;
    padding: 76px 22px 36px;
    transition: left var(--transition);
    overflow-y: auto;
}
.mobile-menu.open { left: 0; }
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: all; }
.mobile-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
}
.mobile-nav { display: flex; flex-direction: column; gap: 3px; }
.mobile-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    padding: 11px 14px;
    border-radius: 8px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-nav a i { width: 18px; text-align: center; }
.mobile-nav a:hover, .mobile-nav a.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mobile-nav-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 8px 0; }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    backdrop-filter: blur(8px);
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-box { width: 90%; max-width: 600px; position: relative; }
.search-input-wrap { position: relative; }
.search-input-wrap i {
   
    color: var(--text3);
    font-size: 17px;
}
.search-input {
    width: 100%;
    padding: 17px 50px 17px 48px;
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 12px;
    font-size: 17px;
    color: var(--text);
    outline: none;
}
.search-close-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text2);
    cursor: pointer;
    background: none;
    border: none;
}

/* ============ NEWSLETTER CTA ============ */
.newsletter-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 50%, #0f3460 100%);
    padding: 56px 0;
    margin-top: 20px;
}
.newsletter-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.nl-cta-text h2 {
    font-family: "Oswald", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.nl-cta-text p { font-size: 14px; color: rgba(255, 255, 255, 0.75); }
.nl-cta-form { display: flex; flex-direction: column; gap: 10px; min-width: 340px; }
.nl-cta-input-row { display: flex; gap: 8px; }
.nl-cta-input {
    flex: 1;
    padding: 11px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border var(--transition);
}
.nl-cta-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.nl-cta-input:focus { border-color: var(--accent); }
.nl-cta-btn {
    padding: 11px 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: all var(--transition);
    white-space: nowrap;
}
.nl-cta-btn:hover { background: #c7152a; }
.nl-cta-notes { display: flex; gap: 18px; flex-wrap: wrap; }
.nl-cta-notes span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 5px;
}
.nl-cta-notes span i { color: #4ade80; }

/* ============ FOOTER ============ */
footer {
    background: var(--footer-bg);
    padding: 52px 0 0;
    transition: background var(--transition);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--footer-divider);
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 240px;
    margin-bottom: 18px;
}
.footer-social { display: flex; gap: 9px; }
.fsoc-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: all var(--transition);
}
.fsoc-btn:hover { background: var(--accent); color: #fff; }
.footer-col h4 {
    font-family: "Oswald", sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 13px; color: rgba(255, 255, 255, 0.5); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-contact { display: flex; flex-direction: column; gap: 9px; }
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}
.footer-contact-item i { font-size: 14px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    flex-wrap: wrap;
    gap: 10px;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.45); transition: color var(--transition); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 18px; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ============ RESPONSIVE — COMMON ============ */
@media (max-width: 1200px) {
    .more-dropdown { grid-template-columns: repeat(3, 1fr); }
    .nav-utility, .nav-divider { display: none; }
}
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: span 3; }
    .newsletter-cta-inner { flex-direction: column; text-align: center; }
    .nl-cta-form { min-width: 0; width: 100%; max-width: 480px; }
    .more-dropdown { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu, .more-dropdown { display: none !important; }
    .hamburger { display: flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
    .footer-col:last-child { grid-column: span 2; }
    .nl-cta-input-row { flex-direction: column; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand, .footer-col:last-child { grid-column: 1; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
    .more-dropdown { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 6px; }
    .more-cat-item { padding: 8px 10px; }
    .btn { padding: 9px 14px; font-size: 13px; }
}
@media (max-width: 360px) {
    .more-dropdown { grid-template-columns: 1fr; }
}
/* ============ ENHANCED SEARCH OVERLAY STYLES ============ */

/* Search Overlay Container */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.search-overlay.open {
    opacity: 1;
    pointer-events: all;
    display: flex;
    align-items: center;
}

.search-overlay-container {
    width: 100%;
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

/* Search Box */
.search-box {
    background: var(--surface);
    border-radius: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(232, 25, 44, 0.3);
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 100px 16px 52px;
    background: var(--surface);
    border: none;
    border-radius: 60px;
    font-size: 18px;
    color: var(--text);
    outline: none;
}

.search-input::placeholder {
    color: var(--text3);
    font-size: 16px;
}

.search-clear-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface2);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text2);
    transition: all var(--transition);
}

.search-clear-btn:hover {
    background: var(--border);
    color: var(--text);
}

.search-close-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text2);
    font-size: 18px;
    transition: all var(--transition);
}

.search-close-btn:hover {
    background: var(--surface2);
    color: var(--text);
}

/* Results Container */
.search-results-container {
    margin-top: 24px;
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

/* Loading State */
.search-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 24px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text3);
}

.loading-spinner i {
    font-size: 36px;
    color: var(--accent);
}

.loading-spinner span {
    font-size: 14px;
    font-weight: 500;
}

/* No Results */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 14px;
}

.search-no-results i {
    font-size: 56px;
    color: var(--text3);
    opacity: 0.5;
}

.search-no-results h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.search-no-results p {
    color: var(--text3);
    margin: 0;
    font-size: 14px;
}

/* Search Sections */
.search-section {
    border-bottom: 1px solid var(--border);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface2);
    z-index: 1;
}

.search-section-header i {
    font-size: 18px;
    color: var(--accent);
}

.search-section-header h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    color: var(--text);
}

.section-count {
    background: var(--border);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
    margin-left: auto;
}

/* Search Result Items */
.search-results-list {
    padding: 4px 0;
}

.search-result-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--surface2);
}

.result-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface2);
}

.result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-category {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 11px;
}

.result-category i {
    font-size: 11px;
}

.result-category span {
    font-weight: 500;
}

.result-author {
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.article-badge {
    background: rgba(29, 78, 216, 0.12);
    color: #3b82f6;
}

.player-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.result-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text);
    line-height: 1.4;
}

.result-snippet {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
    margin-bottom: 8px;
}

.result-snippet i {
    font-size: 10px;
    margin-right: 4px;
    color: var(--accent);
    opacity: 0.7;
}

.result-excerpt {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 8px;
    line-height: 1.5;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text3);
}

.result-meta i {
    margin-right: 4px;
    font-size: 10px;
}

.player-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text2);
}

.player-info i {
    margin-right: 4px;
    font-size: 10px;
}

.result-stats {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    display: inline-block;
    background: rgba(232, 25, 44, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
}

.result-stats i {
    margin-right: 4px;
    font-size: 10px;
}

/* Keyword Highlighting */
mark.search-highlight {
    background: rgba(245, 158, 11, 0.35);
    color: var(--text);
    padding: 1px 2px;
    border-radius: 3px;
    font-weight: 500;
}

[data-theme="dark"] mark.search-highlight {
    background: rgba(245, 158, 11, 0.45);
}

/* Search Tips */
.search-tips {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.search-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text3);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 40px;
}

.search-tip i {
    font-size: 12px;
    color: var(--accent);
}

.search-tip kbd {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    color: var(--text);
    font-weight: 600;
}

/* Scrollbar Styling for Results */
.search-results-container::-webkit-scrollbar {
    width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
    background: var(--surface2);
}

.search-results-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: var(--text3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-overlay-container {
        margin: 60px auto 20px;
        padding: 0 16px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 90px 14px 48px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
    
    .search-input-wrap .search-icon {
        left: 16px;
        font-size: 16px;
    }
    
    .search-clear-btn {
        right: 54px;
        width: 28px;
        height: 28px;
    }
    
    .search-result-item {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .result-img {
        width: 55px;
        height: 55px;
    }
    
    .result-title {
        font-size: 14px;
    }
    
    .result-snippet,
    .result-excerpt {
        font-size: 11px;
    }
    
    .search-tips {
        gap: 10px;
    }
    
    .search-tip {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .search-tip kbd {
        font-size: 9px;
    }
    
    .search-section-header {
        padding: 12px 16px;
    }
    
    .search-loading,
    .search-no-results {
        padding: 40px 20px;
    }
    
    .search-no-results i {
        font-size: 44px;
    }
    
    .search-no-results h4 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .search-overlay-container {
        margin-top: 50px;
    }
    
    .result-img {
        width: 45px;
        height: 45px;
    }
    
    .result-category {
        gap: 6px;
    }
    
    .result-type-badge {
        padding: 1px 6px;
        font-size: 9px;
    }
    
    .player-info {
        gap: 8px;
        font-size: 10px;
    }
    
    .result-meta {
        gap: 8px;
        font-size: 10px;
    }
    
    .search-tips {
        display: none;
    }
}

/* Dark theme specific adjustments */
[data-theme="dark"] .search-box {
    background: var(--surface);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.active {
    background: var(--surface2);
}

[data-theme="dark"] .search-clear-btn {
    background: var(--surface2);
}

[data-theme="dark"] .search-clear-btn:hover {
    background: var(--border);
}

/* Animation for results appearing */
@keyframes resultFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    animation: resultFadeIn 0.3s ease forwards;
}