/* ==========================================================================
   YAPYSOFT - Duolingo-style Redesign
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-light: #ffffff;
    --bg-gray: #f7f7f7;
    
    --green: #00AEF7;
    --green-shadow: #008cc7;
    --green-hover: #009be0;

    --blue: #213347;
    --blue-shadow: #152230;
    --blue-hover: #1b2a3a;

    --orange: #FF9600;
    --orange-shadow: #CC7B00;

    --pink: #FF4B4B;
    --pink-shadow: #CE3C3C;

    --text-dark: #3c3c3c;
    --text-muted: #777777;
    --border-color: #e5e5e5;
    
    /* Typography */
    --font-main: 'Nunito', 'Outfit', sans-serif;
    
    /* Spacing & Sizes */
    --nav-height: 80px;
    --container-max: 1200px;
    --section-pad: 6rem;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    
    /* Transitions */
    --trans-fast: 0.2s ease-in-out;
}

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utility Classes */
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-pink { color: var(--pink); }
.center { text-align: center; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #f0f0f0;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   DUOLINGO STYLE BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--trans-fast);
    cursor: pointer;
    border: none;
    position: relative;
    top: 0;
}

.btn-primary {
    background-color: var(--green);
    color: #fff;
    box-shadow: 0 4px 0 var(--green-shadow);
}

.btn-primary:hover {
    background-color: var(--green-hover);
}

.btn-primary:active {
    top: 4px;
    box-shadow: 0 0 0 var(--green-shadow);
}

.btn-secondary {
    background-color: var(--blue);
    color: #fff;
    box-shadow: 0 4px 0 var(--blue-shadow);
}

.btn-secondary:hover {
    background-color: var(--blue-hover);
}

.btn-secondary:active {
    top: 4px;
    box-shadow: 0 0 0 var(--blue-shadow);
}

.btn-outline {
    background-color: #fff;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
}

.btn-outline:hover {
    background-color: #f7f7f7;
    color: var(--text-dark);
}

.btn-outline:active {
    top: 4px;
    box-shadow: 0 0 0 var(--border-color);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   LOADER
   -------------------------------------------------------------------------- */
#loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-light);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-logo {
    width: 150px;
    animation: bounce 1s infinite alternate cubic-bezier(0.5, 0.05, 1, 0.5);
    margin-bottom: 2rem;
}

.loader-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--blue);
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-20px); }
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 40px;
    display: block;
}

#nav-menu ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

#nav-menu a {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: color var(--trans-fast);
}

#nav-menu a:hover {
    color: var(--blue);
}

/* --------------------------------------------------------------------------
   SECTIONS LAYOUT
   -------------------------------------------------------------------------- */
section {
    padding: var(--section-pad) 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-header {
    max-width: 800px;
    margin: 0 auto 4rem;
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
}

.hero-text p {
    font-size: 1.25rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-3d {
    position: relative;
    width: 100%;
    height: 600px;
}

#llama-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* --------------------------------------------------------------------------
   LUDIXX SECTION
   -------------------------------------------------------------------------- */
.ludixx-section {
    background-color: var(--bg-gray);
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.ludixx-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.ludixx-3d {
    width: 100%;
    height: 500px;
}

#oso-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--pink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 3px 0 var(--pink-shadow);
}

/* --------------------------------------------------------------------------
   FIDELEXX SECTION
   -------------------------------------------------------------------------- */
.fidelexx-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 6px 0 var(--border-color);
    transition: var(--trans-fast);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 11px 0 var(--border-color);
}

@keyframes softFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.fidelexx-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    animation: softFloat 3s infinite alternate ease-in-out;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   CATALOG (NETFLIX STYLE) SECTION
   -------------------------------------------------------------------------- */
.catalog-section {
    background-color: var(--bg-gray);
    border-top: 2px solid var(--border-color);
    overflow: hidden;
    padding-bottom: 8rem;
}

.catalog-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.catalog-category {
    margin-bottom: 3rem;
}

.catalog-category h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-row-wrapper {
    position: relative;
}

.catalog-row {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    padding-top: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.catalog-row::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.game-item {
    flex: 0 0 280px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 0 var(--border-color);
    transition: var(--trans-fast);
    cursor: pointer;
}

.game-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 9px 0 var(--border-color);
    border-color: var(--blue);
}

.game-cover {
    width: 100%;
    height: 160px;
    background-color: #e5e5e5;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.game-info {
    padding: 1.25rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-platform {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    border-radius: 6px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--trans-fast);
}

.scroll-btn:hover {
    background: var(--bg-gray);
}

.scroll-btn:active {
    transform: translateY(calc(-50% + 4px));
    box-shadow: 0 0 0 var(--border-color);
}

.scroll-btn.left { left: -22px; }
.scroll-btn.right { right: -22px; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
footer {
    border-top: 2px solid var(--border-color);
    padding: 3rem 0;
    background-color: #fff;
    text-align: center;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

footer p {
    font-weight: 700;
    margin: 0;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-container, .ludixx-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem;
    }
    
    .features-list li {
        justify-content: center;
        text-align: left;
    }
    
    .hero-3d, .ludixx-3d {
        height: 400px;
    }
    
    .fidelexx-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .fidelexx-grid {
        grid-template-columns: 1fr;
    }

    #nav-menu {
        display: none; /* Hide for simplicity on mobile in this demo */
    }

    .scroll-btn {
        display: none; /* Rely on touch scroll */
    }
}

/* --------------------------------------------------------------------------
   WHATSAPP FLOAT
   -------------------------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--trans-fast);
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
    background-color: #1ebd5a;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}
