@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --text-primary: #0f1c3f;
    --text-secondary: #4a5568;
    --card-bg: rgba(240, 248, 255, 0.95);
    --accent-blue: #0b1536;
    --glow-color: #4da6ff;
    --star-color: #f6ad55;

    --bg-gold: radial-gradient(circle, #ffd700 0%, #a67c00 100%);
    --bg-green: radial-gradient(circle, #32cd32 0%, #006400 100%);
    --bg-blue: radial-gradient(circle, #1e90ff 0%, #00008b 100%);
    --bg-purple: radial-gradient(circle, #9370db 0%, #4b0082 100%);
    --bg-red: radial-gradient(circle, #ff4500 0%, #8b0000 100%);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: url('https://images.unsplash.com/photo-1614729939124-032f0b5609ce?auto=format&fit=crop&w=1920&q=80') center/cover fixed, #000;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Overlay simulating the control room monitors at bottom */
body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    pointer-events: none;
    z-index: 100;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Dashboard Wrapper layout */
.dashboard-wrapper {
    width: 95%;
    max-width: 1300px;
    margin: 30px auto 100px;
    position: relative;
    z-index: 10;
}

/* Top App Header (Pill) */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 8px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    margin-left: 120px;
    /* Offset to align with center panel */
}

.nav-menu {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link.active {
    background: var(--accent-blue);
    color: #ffffff;
}

.nav-link:hover:not(.active) {
    background: #edf2f7;
}

.search-wrapper {
    background: #edf2f7;
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-wrapper input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    color: var(--text-primary);
    width: 120px;
}

/* Body Layout */
.dashboard-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Left Polygon Navigation */
.left-nav {
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 30px;
}

.nav-poly {
    background: var(--accent-blue);
    color: #fff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: skewX(-15deg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.3);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.nav-poly:hover {
    box-shadow: 0 5px 25px rgba(0, 240, 255, 0.6);
    transform: skewX(-15deg) translateX(5px);
}

.poly-content {
    transform: skewX(15deg);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.poly-content i {
    color: #00f0ff;
    font-size: 1rem;
}

/* Center Ranking Panel */
.ranking-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Vector overlay effect like the image wireframes */
.ranking-panel::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px dashed rgba(0, 240, 255, 0.3);
    border-radius: 40px;
    pointer-events: none;
    z-index: 0;
}

.page-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin: 0 0 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 10;
}

/* Ranking Grid */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 10;
}

/* Cards */
.ranking-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    height: 120px;
    padding-right: 25px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.ranking-card:hover {
    transform: translateY(-3px) scale(1.01);
}

/* Spiral Box */
.rank-box {
    width: 110px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 0 0 20px;
}

.bg-gold {
    background: var(--bg-gold);
}

.bg-green {
    background: var(--bg-green);
}

.bg-blue {
    background: var(--bg-blue);
}

.bg-purple {
    background: var(--bg-purple);
}

.bg-red {
    background: var(--bg-red);
}

/* Create a spiral pattern effect with CSS */
.spiral-overlay {
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0) 20px);
    border-radius: inherit;
    opacity: 0.6;
}

.rank-number {
    position: relative;
    z-index: 2;
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Game Info */
.card-content {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 20px;
    gap: 20px;
}

.game-thumb {
    width: 150px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent-blue);
    margin: 0 0 5px;
    text-transform: uppercase;
}

.game-genre {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.game-desc {
    font-size: 0.75rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: var(--star-color);
    font-size: 0.8rem;
}

.desc-text {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action Area */
.action-area {
    display: flex;
    align-items: center;
    gap: 30px;
}

.view-stats {
    text-align: center;
}

.view-count {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-blue);
    display: block;
}

.view-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-play {
    background: var(--accent-blue);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(11, 21, 54, 0.4);
    transition: all 0.2s;
}

.btn-play:hover {
    background: #000;
    transform: scale(1.05);
}

/* Top Ticker */
.top-ticker {
    background: var(--accent-blue);
    border-radius: 20px;
    margin-top: 0;
    margin-bottom: 30px;
    padding: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-left: 120px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.ticker-content {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ticker-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #00f0ff;
}

.ticker-name {
    font-weight: 700;
}

.ticker-time {
    color: rgba(255, 255, 255, 0.6);
}

.ticker-action {
    font-weight: 600;
    color: #00f0ff;
}

/* SEO Tags Area */
.seo-tags-area {
    margin-top: 30px;
    margin-left: 120px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-height: 150px;
    overflow-y: auto;
}

.seo-tags-area::-webkit-scrollbar {
    width: 5px;
}

.seo-tags-area::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.5);
    border-radius: 5px;
}

.seo-tag {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    transition: all 0.2s;
}

.seo-tag:hover {
    background: #00f0ff;
    color: #000;
    box-shadow: 0 0 10px #00f0ff;
}

/* Disclaimer Box */
.disclaimer-box {
    margin-top: 20px;
    margin-left: 120px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-left: 4px solid #f6ad55;
    border-radius: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    text-align: center;
}

/* Related Grid in View.php */
.related-games-section {
    margin-top: 40px;
    margin-left: 120px;
}

.related-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 240, 255, 0.5);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.related-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #00f0ff;
}

.related-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.related-name {
    padding: 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .related-games-section {
        margin-left: 0;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-body {
        flex-direction: column;
    }

    .app-header {
        margin-left: 0;
        flex-direction: column;
        gap: 15px;
        border-radius: 20px;
    }

    .top-ticker {
        margin-left: 0;
        border-radius: 20px;
    }

    .left-nav {
        flex-direction: row;
        width: 100%;
        position: static;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .nav-poly {
        width: 120px;
        flex-shrink: 0;
    }

    .ranking-card {
        padding-right: 15px;
        height: auto;
        min-height: 120px;
    }

    .desc-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        margin: 10px auto;
        width: 100%;
    }

    .ranking-panel {
        border-radius: 0;
        padding: 15px;
        border: none;
    }

    .ranking-panel::before {
        display: none;
    }

    .ranking-card {
        flex-direction: column;
        padding: 0 0 20px 0;
    }

    .rank-box {
        width: 100%;
        height: 80px;
        border-radius: 20px 20px 0 0;
    }

    .card-content {
        flex-direction: column;
        text-align: center;
    }

    .action-area {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .btn-play {
        width: 100%;
        justify-content: center;
    }

    .game-thumb {
        width: 100%;
        height: 180px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}