/* ==========================================================================
   HAXSCIPT - MODERN ESPORTS CARD GRID ROOM LIST STYLES
   ========================================================================== */

/* Reset + Temel Ayarlar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f0f10;
    --panel: #161618;
    --card-bg: rgba(26, 26, 30, 0.85);
    --card-border: rgba(255, 216, 77, 0.18);
    --card-hover-border: #ffd84d;
    --muted: #a0a0a5;
    --accent: #ffd84d;
    --accent-hover: #ffea62;
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    --radius-card: 20px;
    --radius-btn: 12px;
}

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

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

/* ==================== UNIFIED HEADER & NAVBAR ==================== */
.navbar {
    width: 100%;
    padding: 40px 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    background: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.nav-container {
    width: 90%;
    max-width: 1350px;
    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;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
}

.nav-links a.active {
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.24), 0 0 14px rgba(255, 255, 255, 0.233);
    color: #ffffff;
}

.nav-links a:hover {
    color: #ffea62;
}

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

.nav-buttons a {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    text-decoration: none;
    margin-left: 10px;
    transition: all 0.25s ease;
}

.login-btn {
    border: 2px solid #ffd84d;
    color: #ffd84d;
    background: transparent;
}

.login-btn:hover {
    color: black;
    background-color: #ffea62;
}

.register-btn {
    border: 2px solid #ffd84d;
    background-color: #ffd84d;
    color: black;
}

.register-btn:hover {
    border: 2px solid #ffd84d;
    color: #ffd84d;
    background: transparent;
}

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

/* ==================== ANA KART ALANI ==================== */

.page-wrapper {
    width: 90%;
    max-width: 1400px;
    margin: 150px auto 60px auto;
    flex: 1;
}

/* Üst Başlık & İstatistik Çubuğu */
.rooms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-title-wrap h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title-wrap p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.live-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 213, 115, 0.12);
    border: 1px solid rgba(46, 213, 115, 0.35);
    color: #2ed573;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #2ed573;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ed573;
    animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(46, 213, 115, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0); }
}

.total-players-pill {
    background: rgba(255, 216, 77, 0.12);
    border: 1px solid rgba(255, 216, 77, 0.4);
    color: var(--accent);
    padding: 10px 22px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== ODA KARTLARI GRID YAPISI ==================== */

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
    gap: 28px;
}

/* TEKİL KART */
.room-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 216, 77, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.room-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-hover-border);
    box-shadow: 0 18px 45px rgba(255, 216, 77, 0.16), 0 8px 25px rgba(0, 0, 0, 0.8);
}

.room-card:hover::before {
    opacity: 1;
}

/* Kart Üst Başlık & Durum Rozeti (Dengeli) */
.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.room-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.room-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    word-break: break-word;
}

.room-subtitle {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.status-badge.green {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.status-badge.orange {
    background: rgba(255, 165, 2, 0.15);
    color: #ffa502;
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.status-badge.red {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.status-badge.gray {
    background: rgba(160, 160, 165, 0.15);
    color: #a0a0a5;
    border: 1px solid rgba(160, 160, 165, 0.3);
}

/* İlerleme Çubuğu & Doluluk Bilgisi */
.capacity-box {
    background: rgba(14, 14, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.capacity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.capacity-title {
    color: var(--muted);
    font-weight: 500;
}

.capacity-count {
    font-weight: 700;
    color: #ffffff;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #232328;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease, background 0.4s ease;
}

.progress-fill.green {
    background: linear-gradient(90deg, #2ed573, #7bed9f);
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.5);
}

.progress-fill.orange {
    background: linear-gradient(90deg, #ffa502, #ff7f50);
    box-shadow: 0 0 10px rgba(255, 165, 2, 0.5);
}

.progress-fill.red {
    background: linear-gradient(90deg, #ff4757, #ff6b81);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

/* Kart Altı & Butonlar */
.card-footer-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 2px;
}

.card-play-btn {
    flex: 1;
    background: linear-gradient(135deg, #ffd84d 0%, #f6c927 100%);
    color: #121214;
    border: none;
    padding: 13px 20px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-decoration: none;
}

.card-play-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 216, 77, 0.4);
}

.card-play-btn:active {
    transform: scale(0.98);
}

.card-play-btn:disabled {
    background: #333338;
    color: #777780;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.card-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e0e0e5;
    padding: 13px 18px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ==================== FOOTER ==================== */
.site-footer {
    background-color: #000000;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.footer-logo {
    width: 75px;
    opacity: 0.85;
}

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

.social-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

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

.footer-right .copyright {
    color: var(--muted);
    font-size: 13px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .room-grid {
        grid-template-columns: 1fr;
    }
    .rooms-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(14, 14, 16, 0.95);
        backdrop-filter: blur(20px);
        position: absolute;
        top: 85px;
        left: 5%;
        width: 90%;
        padding: 25px 0;
        border-radius: 16px;
        border: 1px solid rgba(255, 216, 77, 0.2);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-buttons {
        display: none;
    }

    .site-footer {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}