/* ==========================================================================
   HAXSCIPT - V4.1 CYBER ESPORTS MATCH REPLAY CARDS (ALT ALTA KADRO)
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}

:root {
    --bg: #0a0a0c;
    --card-bg: rgba(16, 16, 21, 0.94);
    --card-border: rgba(255, 216, 77, 0.15);
    --accent: #ffd84d;
    --accent-hover: #ffea62;
    --accent-glow: rgba(255, 216, 77, 0.35);
    --muted: #9ca3af;
    --red: #ff4757;
    --red-glow: rgba(255, 71, 87, 0.3);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.3);
    --success: #10b981;
}

html, body {
    min-height: 100%;
}

body {
    background-image: url("../İmages/BG.png");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-color: var(--bg);
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==================== NAVBAR ==================== */
.navbar {
    width: 100%;
    padding: 40px 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    background: transparent !important;
}

.nav-container {
    width: 90%;
    max-width: 1360px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    width: 64px;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    margin-left: 55px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
}

.nav-links a.active {
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.24), 0 0 14px rgba(255, 255, 255, 0.23);
    color: #ffffff;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

.nav-links a:hover {
    color: var(--accent-hover);
}

/* BUTTONS */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-buttons a {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.login-btn {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.login-btn:hover {
    color: black;
    background-color: var(--accent-hover);
}

.register-btn {
    border: 2px solid var(--accent);
    background-color: var(--accent);
    color: black;
}

.register-btn:hover {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
}

/* ==================== WRAPPER ==================== */
.matches-wrapper {
    width: 90%;
    max-width: 1360px;
    margin: 140px auto 40px;
    flex: 1;
}

/* HEADER */
.matches-header {
    text-align: center;
    margin-bottom: 28px;
}

.matches-title {
    font-size: 34px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
    text-shadow: 0 0 25px rgba(255, 216, 77, 0.25);
}

.title-icon {
    font-size: 36px;
}

.matches-subtitle {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--muted);
    max-width: 740px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ==================== ROOM FILTER BAR ==================== */
.room-filters-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.room-filter-pill {
    background: rgba(20, 20, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--card-border);
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.room-filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.room-filter-pill.active {
    background: linear-gradient(135deg, #ffd84d 0%, #f59e0b 100%);
    color: #000000;
    border-color: var(--accent);
    box-shadow: 0 0 22px rgba(255, 216, 77, 0.45);
    transform: translateY(-2px);
}

/* ==================== CONTROLS BAR ==================== */
.matches-controls-bar {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
    padding: 12px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    gap: 16px;
    flex-wrap: wrap;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.active-badge {
    font-size: 12.5px;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.4px;
}

.match-count {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #17171d;
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 6px 14px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(255, 216, 77, 0.25);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 500;
    width: 210px;
    transition: width 0.2s ease;
}

.search-box input:focus {
    width: 260px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.search-icon {
    font-size: 13px;
    opacity: 0.7;
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
}

.refresh-btn {
    background: #17171d;
    border: 1.5px solid var(--card-border);
    color: #ffffff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.refresh-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ==================== MATCH FEED GRID ==================== */
.matches-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
    gap: 26px;
    margin-bottom: 45px;
}

/* ==================== CYBER MATCH CARD ==================== */
.cyber-match-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--card-border);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
    position: relative;
    overflow: hidden;
}

.cyber-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red) 0%, var(--accent) 50%, var(--blue) 100%);
    opacity: 0.8;
}

.cyber-match-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 216, 77, 0.45);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 216, 77, 0.15);
}

/* 1. Card Meta Row */
.cyber-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-chip {
    display: flex;
    align-items: center;
    background: rgba(255, 216, 77, 0.08);
    border: 1.5px solid rgba(255, 216, 77, 0.25);
    padding: 4px 12px;
    border-radius: 8px;
}

.room-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.badge-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 216, 77, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 216, 77, 0.35);
    text-transform: uppercase;
}

.meta-center {
    display: flex;
    align-items: center;
}

.match-result-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.match-result-pill.red-win {
    background: rgba(255, 71, 87, 0.18);
    color: var(--red);
    border: 1px solid rgba(255, 71, 87, 0.4);
}

.match-result-pill.blue-win {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.match-result-pill.draw {
    background: rgba(255, 216, 77, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 216, 77, 0.35);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-time-text, .match-duration-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 7px;
    border-radius: 6px;
}

/* 2. Cyber Arena (Stadium Matchup) */
.cyber-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    background: radial-gradient(ellipse at center, rgba(30, 30, 42, 0.8) 0%, rgba(12, 12, 16, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 14px;
    margin-bottom: 14px;
    position: relative;
    min-height: 140px;
}

.arena-team {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.arena-team.victorious .team-main-name {
    color: var(--accent) !important;
    text-shadow: 0 0 12px rgba(255, 216, 77, 0.4);
}

.team-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-header-row.right-align {
    justify-content: flex-end;
}

.team-crest {
    font-size: 20px;
}

.team-titles {
    display: flex;
    flex-direction: column;
}

.team-titles.right-align {
    align-items: flex-end;
    text-align: right;
}

.team-main-name {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.6px;
}

.arena-team.red .team-main-name {
    color: var(--red);
}

.arena-team.blue .team-main-name {
    color: #60a5fa;
}

.team-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

/* ==================== ALT ALTA OYUNCU LİSTESİ ==================== */
.team-roster-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 125px;
    overflow-y: auto;
    padding-right: 2px;
}

.team-roster-list::-webkit-scrollbar {
    width: 3px;
}

.team-roster-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.player-row:hover {
    transform: translateX(2px);
}

.red-row {
    background: rgba(255, 71, 87, 0.10);
    border: 1px solid rgba(255, 71, 87, 0.25);
    color: #ffa4ad;
}

.blue-row {
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    justify-content: flex-end;
}

.blue-row:hover {
    transform: translateX(-2px);
}

.player-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.red-ind {
    background-color: var(--red);
    box-shadow: 0 0 6px var(--red);
}

.blue-ind {
    background-color: var(--blue);
    box-shadow: 0 0 6px var(--blue);
}

.player-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}

.empty-roster {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
    padding: 4px 0;
}

.empty-roster.align-right {
    text-align: right;
}

/* Score Hub */
.arena-score-hub {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
}

.score-glass-plate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0d0d12;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(255, 216, 77, 0.28);
    border-radius: 12px;
    padding: 8px 18px;
}

.score-digit {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.score-digit.red-digit {
    color: var(--red);
}

.score-digit.blue-digit {
    color: #60a5fa;
}

.score-divider {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
}

.vs-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1px;
}

/* 3. Card Footer */
.cyber-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    gap: 12px;
}

.footer-match-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
}

.title-sep {
    opacity: 0.5;
}

.sub-title-text {
    color: #e5e7eb;
    font-weight: 700;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cyber-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.play-btn {
    background: linear-gradient(135deg, #ffd84d 0%, #f59e0b 100%);
    color: #000000;
    box-shadow: 0 4px 14px rgba(255, 216, 77, 0.3);
    position: relative;
    overflow: hidden;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 216, 77, 0.5);
    background: linear-gradient(135deg, #ffea62 0%, #fbbf24 100%);
}

.play-icon {
    font-size: 11px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.copy-btn.copied {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #10b981;
}

.no-replay-text {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
}

/* ==================== LOADING & EMPTY STATES ==================== */
.matches-loading-state,
.matches-empty-state {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 20px;
    padding: 50px 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.cyber-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 216, 77, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.matches-loading-state p {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.matches-empty-state .empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.matches-empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.matches-empty-state p {
    font-size: 13.5px;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto 20px;
}

.retry-btn {
    background: var(--accent);
    color: #000000;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.retry-btn:hover {
    background: var(--accent-hover);
}

/* ==================== FOOTER ==================== */
.site-footer {
    width: 100%;
    background: transparent;
    padding: 30px 0;
    margin-top: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.site-footer .footer-left,
.site-footer .footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.social-links a:hover {
    color: var(--accent);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .matches-feed-grid {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .matches-wrapper {
        margin-top: 120px;
    }
}
