* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-primary: #e4e4e4;
    --text-secondary: #a0a0a0;
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #16213e;
    --border-color: #2a2a3e;
    --shadow-light: rgba(233, 69, 96, 0.1);
    --shadow-medium: rgba(233, 69, 96, 0.2);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    --max-width: 1200px;
    --header-height: 70px;
    --footer-height: auto;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    background-image:
        linear-gradient(rgba(233, 69, 96, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(233, 69, 96, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--highlight-color);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-sm);
}

.nav-menu li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 0;
    position: relative;
    transition: color var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--highlight-color);
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--highlight-color);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 0;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--highlight-color);
    transition: all var(--transition-fast);
}

.header-search:focus-within {
    border-left-width: 5px;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    padding: 0.25rem;
    font-size: 0.95rem;
    width: 200px;
    color: var(--text-primary);
}

.header-search input::placeholder {
    color: var(--text-secondary);
}

.header-search button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--highlight-color);
    transition: transform var(--transition-fast);
}

.header-search button:hover {
    transform: scale(1.1);
}

.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-primary);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
    border-top: 3px solid var(--highlight-color);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--highlight-color) 50%,
            transparent 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    position: relative;
    padding-left: var(--spacing-sm);
}

.footer-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%;
    background: var(--highlight-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.footer-logo img {
    height: 35px;
    width: auto;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-description a {
    color: #fff;
}

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

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    padding-left: 15px;
}

.footer-links a::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--highlight-color);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover {
    color: var(--highlight-color);
    padding-left: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--highlight-color) 0%, #c23a54 100%);
    color: #FFFFFF;
    border: 2px solid var(--highlight-color);
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--highlight-color);
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.game-card {
    background-color: var(--bg-card);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    transition: all var(--transition-medium);
    cursor: pointer;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0) 0%, rgba(233, 69, 96, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 1;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px);
    border-left-color: var(--highlight-color);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

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

.game-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-secondary);
    transition: transform var(--transition-medium);
}

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

.game-card-content {
    padding: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.game-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--highlight-color) 0%, #c23a54 100%);
    color: #FFFFFF;
    font-size: 0.75rem;
    border-radius: 0;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.game-card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-featured {
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--highlight-color);
    position: relative;
    overflow: hidden;
}

.game-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(233, 69, 96, 0.15),
            transparent);
    transition: left 0.6s;
}

.game-card-featured:hover::before {
    left: 100%;
}

.game-card-featured .game-card-category {
    background: linear-gradient(135deg, var(--highlight-color) 0%, #c23a54 100%);
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
}

.game-card-featured:hover {
    transform: translateY(-8px) scale(1.02);
    border-top-width: 6px;
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.4);
}

.game-card-featured .game-card-image {
    transition: transform 0.5s ease;
}

.game-card-featured:hover .game-card-image {
    transform: scale(1.1) rotate(2deg);
}

.game-card-recent {
    display: flex;
    flex-direction: row;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-color);
    background: var(--bg-card);
    position: relative;
    min-height: 180px;
    overflow: hidden;
}

.game-card-recent::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 52, 96, 0.3));
    transition: width var(--transition-medium);
}

.game-card-recent:hover::after {
    width: 40%;
}

.game-card-recent .game-card-image {
    width: 280px;
    min-width: 280px;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    filter: brightness(0.85) contrast(1.1);
    transition: all var(--transition-medium);
}

.game-card-recent:hover .game-card-image {
    filter: brightness(1) contrast(1.2);
    transform: scale(1.05);
}

.game-card-recent .game-card-content {
    flex: 1;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 2;
}

.game-card-recent .game-card-title {
    font-size: 1.4rem;
    margin-bottom: 0;
    -webkit-line-clamp: 2;
    font-weight: 700;
    line-height: 1.3;
}

.game-card-recent .game-card-category {
    background: var(--accent-color);
    color: #FFFFFF;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    align-self: flex-start;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.game-card-recent .game-card-description {
    -webkit-line-clamp: 3;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: auto;
}

.game-card-recent:hover {
    border-left-width: 8px;
    transform: translateX(5px);
    box-shadow: -5px 5px 25px rgba(15, 52, 96, 0.4);
}

.game-card-style-1::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, var(--highlight-color) 50%);
    opacity: 0.3;
    z-index: 1;
}

.game-card-style-1 .game-card-category {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0a2647 100%);
}

.game-card-style-1:hover {
    border-left-color: var(--accent-color);
}

.game-card-style-2 {
    border-left: 1px solid var(--border-color);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-medium);
}

.game-card-style-2::before {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0) 0%, rgba(15, 52, 96, 0.15) 100%);
}

.game-card-style-2 .game-card-category {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-left: 3px solid var(--highlight-color);
}

.game-card-style-2:hover {
    border-bottom-color: var(--highlight-color);
    transform: translateY(-5px);
}

.game-card-style-3 {
    border: 2px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    position: relative;
}

.game-card-style-3::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    transition: border-color var(--transition-medium);
    pointer-events: none;
}

.game-card-style-3 .game-card-category {
    background: transparent;
    border: 2px solid var(--highlight-color);
    color: var(--highlight-color);
}

.game-card-style-3:hover::after {
    border-color: var(--highlight-color);
}

.game-card-style-3:hover {
    transform: scale(1.02);
    border-color: var(--border-color);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--highlight-color) 0%, #c23a54 100%);
    color: #FFFFFF;
    border: 2px solid var(--highlight-color);
    border-radius: 0;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--highlight-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.no-games {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        box-shadow: 2px 0 10px var(--shadow-light);
        transition: left var(--transition-medium);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .header-search {
        display: none;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .game-card-recent {
        min-height: 160px;
    }

    .game-card-recent .game-card-image {
        width: 220px;
        min-width: 220px;
    }

    .game-card-recent .game-card-title {
        font-size: 1.2rem;
    }

    .game-card-recent .game-card-category {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.25rem;
    }

    .game-card-recent {
        flex-direction: column;
        min-height: auto;
    }

    .game-card-recent .game-card-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }

    .game-card-recent .game-card-content {
        padding: var(--spacing-md);
    }

    .game-card-recent .game-card-title {
        font-size: 1.1rem;
    }
}