/*
Theme Name: Bugy Games
Theme URI: https://bugy.games
Author: Bugy Games
Author URI: https://bugy.games
Description: A bright, friendly WordPress theme for Bugy Games studio.
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bugygames
Tags: gaming, light, one-page, custom-logo
*/

/* ============================================
   Variables & Reset
   ============================================ */
:root {
    --bg: #faf8f6;
    --bg-alt: #ffffff;
    --bg-warm: #fff5f5;
    --bg-hero: #1a1a2e;
    --coral: #E8565A;
    --coral-light: #ff7b7f;
    --coral-soft: #ffe0e1;
    --coral-bg: #fff0f0;
    --purple: #6c5ce7;
    --purple-light: #a29bfe;
    --yellow: #fdcb6e;
    --mint: #55efc4;
    --blue: #74b9ff;
    --dark: #2d3436;
    --dark-soft: #3d3d3d;
    --gray-100: #f7f7f7;
    --gray-200: #eee;
    --gray-300: #ddd;
    --gray-400: #bbb;
    --gray-500: #888;
    --gray-600: #666;
    --text: #2d2d2d;
    --text-light: #555;
    --text-muted: #999;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 50px rgba(0,0,0,0.1);
    --shadow-card: 0 4px 20px rgba(232, 86, 90, 0.1);
    --shadow-hover: 0 12px 40px rgba(232, 86, 90, 0.18);
    --radius: 20px;
    --radius-lg: 28px;
    --radius-sm: 12px;
    --transition: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-logo-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--coral);
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 8px 16px;
    color: var(--dark);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--coral);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================
   Hero - Warm gradient background
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(160deg, #1a1a2e 0%, #2d1b3d 40%, #3d1c3a 70%, #4a1942 100%);
    padding: 100px 24px 80px;
}

/* Hero Slider */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.active {
    opacity: 0.4; /* overridden by JS from customizer setting */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(26, 26, 46, 0.5) 0%,
        rgba(45, 27, 61, 0.6) 50%,
        rgba(26, 26, 46, 0.9) 100%);
    z-index: 1;
}

/* Slider dots */
.hero-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.hero-dot.active {
    background: var(--coral);
    transform: scale(1.2);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(232, 86, 90, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(108, 92, 231, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(253, 203, 110, 0.08) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-logo {
    max-width: 100%;
    margin: 0 auto 28px;
}

.hero-logo img,
.hero-logo .custom-logo {
    width: 100%;
    height: auto;
    display: block;
}

.hero-logo a {
    display: block;
}

.hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 14px;
    line-height: 1.3;
}

.hero h1 em {
    font-style: normal;
    color: var(--coral-light);
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    max-width: 460px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    font-size: 0.88rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: var(--font);
}

.btn-coral {
    background: var(--coral);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(232, 86, 90, 0.35);
}

.btn-coral:hover {
    background: var(--coral-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232, 86, 90, 0.4);
}

.btn-white {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.25);
}

.btn-white:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

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

.btn-outline:hover {
    background: var(--coral);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.82rem;
}

/* ============================================
   Section Base
   ============================================ */
.section {
    padding: 90px 0;
    position: relative;
}

.section-header {
    margin-bottom: 50px;
}

.section-header-center {
    text-align: center;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--coral);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    color: var(--dark);
}

.section-desc {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 480px;
    margin-top: 10px;
    line-height: 1.7;
}

.section-header-center .section-desc {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Steam Games - Friendly card grid
   ============================================ */
#games {
    background: var(--bg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap, 28px);
}

/* Grid column variants */
.games-grid-cols-1 { grid-template-columns: 1fr; max-width: 700px; margin-left: auto; margin-right: auto; }
.games-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.games-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.games-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.game-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--coral-soft);
}

.game-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--card-ratio, 16/10);
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.game-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 14px;
    background: var(--coral);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(232,86,90,0.3);
}

.game-card-body {
    padding: 22px 24px;
}

.game-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}

.game-card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.game-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--coral);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all var(--transition);
}

.game-card-link:hover {
    background: var(--coral-light);
    color: var(--white);
    transform: scale(1.05);
}

.game-card-link svg {
    width: 14px;
    height: 14px;
}

/* ---- Card Style: Compact ---- */
.games-style-compact .game-card-body {
    padding: 14px 18px;
}

.games-style-compact .game-card-desc {
    display: none;
}

.games-style-compact .game-card-footer {
    margin-top: 0;
}

/* ---- Card Style: Overlay ---- */
.games-style-overlay .game-card {
    border: none;
    position: relative;
}

.games-style-overlay .game-card-image {
    aspect-ratio: var(--card-ratio, 16/10);
    height: 100%;
}

.games-style-overlay .game-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 50%;
}

.games-style-overlay .game-card-title {
    color: #fff;
    font-size: 1.1rem;
}

.games-style-overlay .game-card-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.games-style-overlay .game-card-link {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.games-style-overlay .game-card-link:hover {
    background: var(--coral);
    border-color: var(--coral);
}

.games-style-overlay .game-card-badge {
    z-index: 3;
}

/* Featured card - full width */
.game-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border: 3px solid var(--white);
}

.game-card-featured .game-card-image {
    aspect-ratio: auto;
    min-height: 300px;
}

.game-card-featured .game-card-body {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-card-featured .game-card-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.game-card-featured .game-card-desc {
    -webkit-line-clamp: 4;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ============================================
   Store Links Section (replacing mobile grid)
   ============================================ */
#stores {
    background: var(--bg-warm);
}

.stores-wrapper {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.store-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    border: 2px solid transparent;
    min-width: 300px;
}

.store-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--coral-soft);
}

.store-card-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.store-card-icon img,
.store-card-icon svg {
    width: 100%;
    height: 100%;
}

.store-card-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2px;
}

.store-card-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   About Section
   ============================================ */
#about {
    background: var(--bg-alt);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-block {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    border: 2px solid var(--gray-200);
    transition: all var(--transition);
}

.stat-block:hover {
    border-color: var(--coral-soft);
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--coral);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================
   Contact
   ============================================ */
#contact {
    background: var(--bg-warm);
}

.contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--coral);
    transition: all var(--transition);
    margin-top: 8px;
}

.contact-email-link:hover {
    color: var(--coral-light);
    transform: scale(1.03);
}

.contact-email-link svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.social-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Brand colors on hover */
.social-icon[aria-label="Steam"]:hover       { background: #1b2838; color: #fff; }
.social-icon[aria-label="Linkedin"]:hover     { background: #0A66C2; color: #fff; }
.social-icon[aria-label="Instagram"]:hover    { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.social-icon[aria-label="Twitter"]:hover      { background: #000; color: #fff; }
.social-icon[aria-label="Youtube"]:hover      { background: #FF0000; color: #fff; }
.social-icon[aria-label="Discord"]:hover      { background: #5865F2; color: #fff; }
.social-icon[aria-label="Tiktok"]:hover       { background: #000; color: #fff; }
.social-icon[aria-label="Facebook"]:hover     { background: #1877F2; color: #fff; }
.social-icon[aria-label="Twitch"]:hover       { background: #9146FF; color: #fff; }
.social-icon[aria-label="Reddit"]:hover       { background: #FF4500; color: #fff; }
.social-icon[aria-label="Github"]:hover       { background: #181717; color: #fff; }

.social-icon svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--dark);
    padding: 32px 0;
    color: rgba(255,255,255,0.5);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.8rem;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: rgba(255,255,255,0.45);
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.footer-social-icon svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Scroll Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .games-grid { gap: 20px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .nav-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        padding: 16px 20px;
        transform: translateY(-120%);
        transition: transform var(--transition);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
    }

    .main-nav.active { transform: translateY(0); }

    .main-nav ul {
        flex-direction: column;
        gap: 2px;
    }

    .main-nav a {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    /* Tablet: use tablet column setting */
    .games-grid-tablet-1 { grid-template-columns: 1fr; }
    .games-grid-tablet-2 { grid-template-columns: repeat(2, 1fr); }
    .games-grid-tablet-3 { grid-template-columns: repeat(3, 1fr); }

    .games-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }

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

    .game-card-featured .game-card-image {
        min-height: 200px;
    }

    .game-card-featured .game-card-body {
        padding: 24px;
    }

    .stores-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .store-card {
        width: 100%;
        max-width: 360px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section { padding: 60px 0; }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .contact-email-link { font-size: 1.1rem; }
}

/* ============================================
   Single Game Page
   ============================================ */
.game-single-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}

.game-single-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition);
}

.game-single-back:hover {
    color: var(--coral);
}

.game-single-back svg {
    flex-shrink: 0;
}

.game-single-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 16px;
}

.game-single-desc p {
    margin-bottom: 14px;
}

.game-single-stores {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.game-single-stores .btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================
   Pagination
   ============================================ */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    color: var(--text-light);
    background: var(--white);
    transition: all var(--transition);
}

.nav-links a:hover {
    border-color: var(--coral);
    color: var(--coral);
}

.nav-links .current {
    background: var(--coral);
    border-color: var(--coral);
    color: var(--white);
}

@media (max-width: 768px) {
    .game-single-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    .btn { width: 100%; justify-content: center; max-width: 260px; }
    .about-stats { grid-template-columns: 1fr 1fr; }

    /* Mobile: always 1 column */
    .games-grid,
    .games-grid-cols-2,
    .games-grid-cols-3,
    .games-grid-cols-4,
    .games-grid-tablet-2,
    .games-grid-tablet-3 {
        grid-template-columns: 1fr;
    }
}
