/* ==============================
   Core Styling (Seamless & Modern)
============================== */
:root {
    --bg: #000000;
    --text: #ffffff;
    --accent: #00aaff;
    --accent-glow: rgba(0, 170, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(20px) saturate(180%);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --footer-bg: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    overflow-x: hidden;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ==============================
   Glass Header & Animated Logo
============================== */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0,0,0,0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 40px;
}

.logo-c {
    height: 32px;
    width: auto;
    z-index: 2;
}

.logo-name-wrapper {
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.logo-name {
    font-size: 1.1rem;
    font-weight: 600;
    padding-left: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-area:hover .logo-name-wrapper {
    max-width: 300px;
}

.logo-area:hover .logo-name {
    opacity: 1;
}

/* ==============================
   Search Bar (Modernized)
============================== */
.search-area {
    flex-grow: 1;
    max-width: 400px;
    position: relative;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-icon {
    width: 18px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 10px;
}

#main-search {
    background: none;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
}

#main-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-results-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1001;
}

.search-result-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==============================
   Nav Controls
============================== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-picker {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.85rem;
    outline: none;
}

.lang-picker option {
    background: #111;
}

.icon-btn {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.icon-btn:hover {
    opacity: 1;
}

/* ==============================
   Hero Section (Creative Engine)
============================== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('carley_foto_web/Escena de videojuego.png') center/cover no-repeat;
    z-index: -1;
}

.hero-content-overlay {
    max-width: 900px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.welcome-msg {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, #ffffff, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    font-weight: 400;
}

.title-link:hover {
    color: var(--accent);
    transition: color 0.3s ease;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.cta-button {
    background: var(--accent);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background: #0088cc;
}

/* ==============================
   Product Reveals (Seamless Side-by-Side)
============================== */
.product-reveal {
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.product-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.reveal-text {
    padding: 2rem;
}

.reveal-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.reveal-p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
}

.reveal-link {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.3s ease;
}

.reveal-link:hover {
    transform: translateX(8px);
}

.reveal-image img {
    width: 100%;
    height: auto;
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
}

.product-reveal.alt .reveal-container {
    /* Side-by-side already handled by DOM order, but we can reverse grid if needed */
}

@media (max-width: 900px) {
    .reveal-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .product-reveal.alt .reveal-container {
        direction: initial;
    }
    .hero-title {
        font-size: 3rem;
    }
}

/* ==============================
   Studio Footer
============================= */
.studio-footer {
    padding: 6rem 2rem 2rem;
    background: var(--footer-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-h {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-legal {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==============================
   Modals (Studio Style)
============================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
}

.studio-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    z-index: 2001;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: 2rem;
}

.modal-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    margin-bottom: 1.5rem;
    outline: none;
}

.modal-btn {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.modal-btn.primary {
    background: var(--accent);
    color: white;
}

.modal-btn.outline {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.modal-btn.danger {
    background: #ff4444;
    color: white;
}

.hidden {
    display: none !important;
}

/* ==============================
   Creative Engine Layout
============================== */
.engine-body {
    overflow: hidden;
}

.engine-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 280px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    padding-left: 1rem;
}

.mini-logo {
    height: 32px;
}

.ce-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.sidebar-nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    transition: var(--transition);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    color: var(--accent);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: var(--transition);
}

.home-btn:hover {
    background: var(--accent);
}

/* Content Area */
.engine-content {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--bg);
    padding: 0;
    scroll-behavior: smooth;
}

.content-section {
    display: none;
    padding: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Components */
.info-hero {
    height: 300px;
    border-radius: 32px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.info-hero-title {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.ce-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.ce-text.small { font-size: 0.95rem; }

.ce-subtitle {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--accent);
}

.ce-list {
    margin-bottom: 2rem;
}

.ce-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.ce-list strong { color: white; }

.video-container {
    margin: 3rem 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    background: #000;
}

.ce-video {
    width: 100%;
    display: block;
}

/* Forms & Cards */
.ce-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    margin-left: 4px;
}

.ce-input, .ce-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.ce-input:focus, .ce-textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.ce-textarea {
    height: 150px;
    resize: vertical;
}

.ce-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.ce-btn.primary { background: var(--accent); color: white; }
.ce-btn.outline { border: 1px solid var(--accent); color: var(--accent); }
.ce-btn.danger { background: #ff4444; color: white; }

.ce-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* Social Cards */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-card {
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
}

.social-card i { width: 32px; height: 32px; }
.social-card:hover { transform: translateY(-5px); }

.yt:hover { background: #ff0000; color: white; }
.discord:hover { background: #5865f2; color: white; }
.wa:hover { background: #25d366; color: white; }
.fb:hover { background: #1877f2; color: white; }
.tt:hover { background: #000000; color: white; border: 1px solid white; }

/* Claims & Opinions */
.claim-msg {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.claim-hint, .opinion-hint {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 1rem 0;
    line-height: 1.4;
}

.donation-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.ads-box {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.ads-label { font-size: 0.7rem; color: rgba(255, 255, 255, 0.2); text-transform: uppercase; }

.inline-link { color: var(--accent); text-decoration: underline; }

.credits-container {
    text-align: center;
}

.credit-item {
    margin: 2rem 0 3rem;
}

.credit-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

@media (max-width: 800px) {
    .sidebar { width: 70px; padding: 2rem 0.5rem; }
    .ce-title, .nav-item span, .sidebar-footer select { display: none; }
    .sidebar-logo { padding: 0; justify-content: center; }
    .nav-item { justify-content: center; padding: 1rem; }
    .content-section { padding: 2rem; }
}
