/* ================================== */
/* === SEARCH-STYLE.CSS (New File) === */
/* ================================== */

/* THEME & CORE VARIABLES */
:root {
  --bg-primary: #0a0a0a; --bg-secondary: #161b22; --text-primary: #c9d1d9; --text-secondary: #8b949e; --accent-primary: #2f81f7; --accent-hover: #58a6ff; --border-color: #262626; --shadow-color: rgba(0, 0, 0, 0.2); --placeholder-bg: #262626; --shimmer-color: rgba(255, 255, 255, 0.1);
}

/* GENERAL & TYPOGRAPHY */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg-primary); color: var(--text-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.fullpage { padding: 0 1rem; }
.loader { display: flex; justify-content: center; align-items: center; padding: 40px; }
.loader::after { content: ''; width: 40px; height: 40px; border: 4px solid var(--border-color); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* HEADER & NAVIGATION */
.site-header { position: sticky; top: 0; left: 0; width: 100%; background: var(--bg-primary); border-bottom: 1px solid var(--border-color); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; z-index: 1000; box-shadow: 0 2px 6px var(--shadow-color); margin-bottom: 15px; }
.header-left, .header-right { display: flex; align-items: center; gap: 12px; }
.header-left { flex-grow: 1; min-width: 0; }
.site-logo img { height: 40px; border-radius: 6px; display: block; }
.header-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; transition: background-color 0.2s, border-color 0.2s, transform 0.2s; cursor: pointer; white-space: nowrap; background-color: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); }
.header-btn:hover { background-color: #2a2a2a; border-color: var(--text-secondary); transform: translateY(-1px); }
.header-btn-discord { background-color: #5865F2; color: #fff; border-color: #5865F2; }
.header-search { flex-grow: 1; max-width: 400px; }
.header-search input { width: 100%; background: var(--bg-secondary); color: var(--text-primary); padding: 8px 12px; font-size: 14px; border: 2px solid var(--border-color); border-radius: 6px; outline: none; transition: border-color 0.2s; }
.header-search input:focus { border-color: var(--accent-primary); }

/* SEARCH PAGE SPECIFIC STYLES */
.page-header { text-align: center; margin: 10px 0 30px 0; }
.page-header h1 { font-size: clamp(22px, 3vw, 32px); color: var(--text-primary); font-weight: 700; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; padding: 0 4px; }
.no-results { grid-column: 1 / -1; text-align: center; color: var(--text-secondary); font-size: 1.1rem; padding: 60px 20px; background-color: var(--bg-secondary); border-radius: 0.5rem; border: 1px solid var(--border-color); }

/* MATCH CARD STYLES */
.match-card { flex: 0 0 200px; max-width: 200px; background: var(--bg-secondary); border-radius: 0.5rem; overflow: hidden; cursor: pointer; transition: transform 0.2s ease; position: relative; display: flex; flex-direction: column; contain: content; }
.match-card:hover { transform: translateY(-4px); will-change: transform; }
.match-poster { width: 100%; height: 120px; object-fit: cover; background-color: var(--placeholder-bg); display: block; aspect-ratio: 200 / 120; }
.status-badge { position: absolute; top: 10px; left: 10px; background: #DC2626; color: #fff; padding: 2px 4px; border-radius: 9999px; font-size: 12px; font-weight: bold; }
.status-badge.live { animation: pulse-red 1.5s infinite; }
.status-badge.date { background: rgba(0,0,0,0.7); }
.match-info { padding: 10px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg-secondary); }
.match-title { font-size: 15px; font-weight: bold; margin-bottom: 6px; color: var(--text-primary); height: 40px; line-height: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: ellipsis; }
.match-meta-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-secondary); }
.match-category { text-transform: capitalize; }

/* LAZY LOAD PLACEHOLDER & ANIMATIONS */
.lazy-placeholder { background-color: var(--placeholder-bg); position: relative; overflow: hidden; }
.lazy-placeholder::after { content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%; transform: skewX(-20deg); background-image: linear-gradient(90deg, transparent, var(--shimmer-color), transparent); animation: shimmer 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1); }
@keyframes shimmer { 100% { left: 150%; } }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

/* SEARCH OVERLAY (Copied from homepage) */
#search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: flex-start; padding-top: 60px; z-index: 9999; backdrop-filter: blur(4px); }
.search-overlay-content { background: var(--bg-secondary); width: 95%; max-width: 700px; border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px var(--shadow-color); position: relative; border: 1px solid var(--border-color); }
#search-overlay input { background: var(--bg-primary); color: var(--text-primary); width: 100%; padding: 14px 18px; font-size: 16px; border: 2px solid var(--accent-primary); border-radius: 10px; outline: none; margin-bottom: 20px; }
#search-overlay input:focus { border-color: var(--accent-hover); box-shadow: 0 0 8px rgba(26,115,232,0.3); }
#search-close { position: absolute; top: 1px; right: 6px; font-size: 30px; background: transparent; border: none; cursor: pointer; color: var(--text-secondary); }
#overlay-search-results { max-height: 70vh; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.search-result-item { flex: 0 0 200px; background: var(--bg-secondary); border-radius: 0.5rem; overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; position: relative; }
.search-result-item:hover { transform: translateY(-4px); box-shadow: 0 6px 16px var(--shadow-color); }

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
  .site-logo { display: none; }
  .site-header { padding: 8px 12px; }
}
@media (max-width: 480px) {
  .fullpage { padding: 0 0.5rem; }
  .header-search { max-width: 140px; }
  .header-search input { font-size: 12px; }
  .header-left, .header-right { gap: 7px; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
  #overlay-search-results .search-result-item { flex-basis: 130px; }
}