/* 
 * 4uGame - Premium UI/UX Styles
 * High-end esports aesthetic with neon accents and smooth animations.
 */

:root {
    --bg-dark: #0a0a0c;
    --bg-card: #16161a;
    --primary: #00f2ff; /* Neon Cyan */
    --secondary: #7000ff; /* Neon Purple */
    --text-main: #ffffff;
    --text-muted: #a0a0a5;
    --accent-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --neon-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navbar --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 15px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.search-container {
    position: relative;
    width: 250px;
}

.search-container input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    color: white;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-container input:focus {
    border-color: var(--primary);
    box-shadow: var(--neon-shadow);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* --- Hero Section --- */
#hero {
    padding: 80px 0;
    background: radial-gradient(circle at top right, rgba(112, 0, 255, 0.1), transparent),
                radial-gradient(circle at bottom left, rgba(0, 242, 255, 0.05), transparent);
}

.hero-box {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.hero-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent 30%);
    animation: rotate 10s linear infinite;
    opacity: 0.1;
    pointer-events: none;
}

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

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-perks {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.perk-item i {
    color: var(--primary);
}

.hero-collage {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    z-index: 1;
}

.collage-item {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, border-color 0.3s;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.collage-item:hover {
    transform: translateZ(20px);
    border-color: var(--primary);
}

.collage-item:hover img {
    opacity: 1;
}

/* --- Game Grid --- */
.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.game-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .card-image img {
    transform: scale(1.1);
}

.card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.card-info {
    padding: 15px;
}

.card-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Game Detail Page --- */
.game-detail {
    padding: 40px 0;
}

.game-header {
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.game-viewport {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
}

.game-viewport iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.game-description {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-description h2, .game-description h3 {
    margin: 25px 0 15px;
    color: var(--primary);
}

.game-description p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.game-description ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.game-description li {
    margin-bottom: 8px;
}

.sidebar-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
}

.sidebar-box h4 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* --- Footer --- */
footer {
    background: #050507;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info p {
    color: var(--text-muted);
    margin-top: 15px;
    max-width: 300px;
}

.footer-links h5 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Cookie Consent --- */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(22, 22, 26, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: translateY(150%);
    transition: transform 0.5s ease;
}

#cookie-banner.show {
    transform: translateY(0);
}

.cookie-content p {
    font-size: 14px;
    max-width: 800px;
}

.cookie-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s;
}

.cookie-btn:hover {
    transform: scale(1.05);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-box {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }
    .hero-content p {
        margin: 0 auto 30px;
    }
    .hero-perks {
        justify-content: center;
    }
    .hero-collage {
        width: 100%;
        max-width: 500px;
        transform: none;
    }
    .game-content-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .search-container {
        display: none;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .hero-perks {
        flex-wrap: wrap;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
