/* ===== VARIABLES ===== */
:root {
    --primary-color: #ff2e63;
    --secondary-color: #08d9d6;
    --accent-color: #ffbd39;
    --dark-bg: #0a0e27;
    --card-bg: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 20px rgba(255, 46, 99, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1535 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Background animated particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 46, 99, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(8, 217, 214, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 46, 99, 0.2);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.logo:hover {
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 46, 99, 0.4));
}

.logo-icon {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: cover;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== MAIN CONTENT & VIEWS ===== */
.main-content {
    padding: 40px 0 60px;
    position: relative;
    overflow-x: hidden;
    min-height: 80vh;
}

.view {
    width: 100%;
    display: none;
    animation-duration: 0.5s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
    display: block;
}

/* Animation Classes */
.slide-out-left {
    animation-name: slideOutLeft;
    position: absolute;
    top: 40px;
    /* Match main-content padding */
    left: 0;
}

.slide-in-right {
    animation-name: slideInRight;
    display: block;
}

.slide-out-right {
    animation-name: slideOutRight;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 10;
}

.slide-in-left {
    animation-name: slideInLeft;
    display: block;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-20%);
        opacity: 0;
    }

    /* Slight parallax feel */
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== GAME VIEW ===== */
.game-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.game-view-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-view-title i {
    font-size: 32px;
    color: var(--primary-color);
}

.game-view-title h2 {
    font-size: 24px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-play-area {
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== GAMES GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo-text h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 28px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .logo-text h1 {
        font-size: 20px;
    }

    .section-title {
        font-size: 24px;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    grid-column: 1 / -1;
    width: 100%;
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 46, 99, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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