/* Variables globales */
:root {
    --wood-light: #e5b875;
    --wood-medium: #c78d46;
    --wood-dark: #8c5324;
    --wood-border: #5c3513;
    
    /* Wood texture overlays: tint on top of the real wood image */
    --wood-gradient: linear-gradient(180deg, rgba(216,159,91,0.55) 0%, rgba(196,135,66,0.65) 100%);
    --wood-gradient-dark: linear-gradient(180deg, rgba(120,65,25,0.7) 0%, rgba(90,45,15,0.8) 100%);
    --wood-gradient-light: linear-gradient(180deg, rgba(237,198,140,0.45) 0%, rgba(223,173,107,0.55) 100%);

    /* Shared wood texture */
    --wood-texture-url: url('assets/wood_bg.jpg');
    
    --shadow-inset: inset 0px 4px 6px rgba(255, 255, 255, 0.4), inset 0px -4px 6px rgba(0, 0, 0, 0.4);
    --shadow-drop: 0px 6px 12px rgba(0, 0, 0, 0.5);
    
    --bg-color: #2c93d2;
    --text-dark: #4a2810;
    --text-light: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif;
}

body {
    background-color: var(--bg-color);
    overflow-x: hidden;
    color: var(--text-dark);
}

#bg.hero-character {
    position: fixed;
    bottom: -10px;
    left: 2%;
    width: 280px;
    z-index: 15;
    pointer-events: none;
}

#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Clases Base (Madera) */
.wood-panel {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient);
    background-blend-mode: multiply;
    border: 4px solid var(--wood-border);
    border-radius: 16px;
    box-shadow: var(--shadow-drop), var(--shadow-inset);
    position: relative;
}

.wood-text-title {
    color: var(--text-light);
    text-shadow: 2px 2px 0px var(--wood-dark), -2px -2px 0px var(--wood-dark), 2px -2px 0px var(--wood-dark), -2px 2px 0px var(--wood-dark), 0px 4px 6px rgba(0,0,0,0.6);
    letter-spacing: 1px;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    margin: 15px;
    border-radius: 25px;
    z-index: 100;
    position: sticky;
    top: 15px;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,0.5));
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 18px;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--wood-gradient-light);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2);
}

/* MAIN CONTENT */
#app {
    padding: 10px 20px; /* Reduced top padding */
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px; /* Reduced from 100px */
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
    display: block;
}

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

/* SECTION: INICIO */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Reduced from 20px */
    margin-top: 5px; /* Reduced from 20px */
}

.hero-logo-container {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.hero-logo-img {
    width: 100%;
    max-width: 380px;
    height: auto;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6));
}

.action-buttons {
    display: flex;
    gap: 20px;
    z-index: 10;
}

.wood-btn {
    display: inline-block;
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient);
    background-blend-mode: multiply;
    border: 4px solid var(--wood-border);
    border-radius: 12px;
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-drop), var(--shadow-inset);
    transition: transform 0.1s, box-shadow 0.1s;
}

.wood-btn:active {
    transform: translateY(4px);
    box-shadow: 0px 2px 4px rgba(0,0,0,0.5), inset 0px 4px 8px rgba(0,0,0,0.6);
}

.action-btn {
    padding: 8px 15px; /* Reduced */
    font-size: 14px; /* Reduced */
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px; /* Reduced */
    justify-content: center;
}
.action-btn i { font-size: 16px; color: #5cb85c; text-shadow: 1px 1px 0 #fff; }
.secondary-btn i { color: #d9534f; }

.form-container {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient-light);
    background-blend-mode: multiply;
    padding: 10px 20px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    z-index: 10;
}

.form-container h2 {
    font-size: 16px;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.input-field input, .input-field textarea {
    padding: 10px;
    border: 2px solid var(--wood-dark);
    border-radius: 8px;
    background: #fffdf5;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
}

.input-field.full-width {
    margin-bottom: 5px;
}

.email-note {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 10px;
}

.submit-btn {
    padding: 8px 30px;
    font-size: 16px;
}



/* SECTION: BALLOONPEDIA & POLÍTICAS COMMON */
.main-panel {
    background: var(--wood-gradient-light);
    padding: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.panel-header {
    text-align: center;
    margin-bottom: 25px;
}
.panel-header .large {
    font-size: 36px;
}

/* BALLOONPEDIA LAYOUT */
.pedia-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pedia-top-row {
    display: flex;
    gap: 20px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.category-block {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--wood-border);
    border-radius: 12px;
    padding: 25px 15px 15px;
    position: relative;
}

.category-title-wrap {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.wood-badge {
    background: var(--wood-gradient);
    border: 3px solid var(--wood-border);
    padding: 4px 20px;
    border-radius: 15px;
    color: var(--text-dark);
    font-size: 16px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.special-grid {
    grid-template-columns: 1fr 1.5fr 1fr;
}

.future-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* WOOD CARD */
.wood-card {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient);
    background-blend-mode: multiply;
    border: 3px solid var(--wood-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0px 2px 4px rgba(255,255,255,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.card-img-container {
    width: 70px;
    height: 70px;
    margin: 5px auto 10px;
    position: relative;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.3);
}

.icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 2;
}

.small-target i { font-size: 20px; opacity: 0.8; }
.ice-effect i { font-size: 30px; text-shadow: 0 0 5px cyan; }
.bomb-effect i { font-size: 30px; text-shadow: 0 0 5px orange; }

.wood-card h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.wood-card p {
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 10px;
    flex-grow: 1;
}

.card-bottom-icon {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5b875;
    text-shadow: 1px 1px 0 #5c3513;
}
.tiny-icon { width: 15px; height: 15px; border-radius: 50%; margin-right: 5px; }

/* SPECIAL CARDS */
.dark-card {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient-dark);
    background-blend-mode: multiply;
    color: #fff;
}
.dark-bg { background-color: rgba(0,0,0,0.5); }
.icon-large { font-size: 40px; color: #d89f5b; margin-top: 15px; }
.lock-circle { position: absolute; bottom: 0; right: 0; background: #5c3513; border-radius: 50%; padding: 5px; width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; }

.blue-text { color: #87CEEB; }
.orange-text { color: #FFA500; }
.shadow-text { text-shadow: 1px 1px 0 #000; }

.featured-card { padding: 5px; }
.featured-img { width: 100%; height: 120px; border-radius: 8px; object-fit: cover; margin-bottom: 10px; }
.featured-card h4 { font-size: 15px; line-height: 1.1; }

/* LOCKED STATE (Future Releases) */
.locked {
    filter: grayscale(100%);
    opacity: 0.8;
}

.wood-texture {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient);
    background-blend-mode: multiply;
    border: 2px solid #5c3513;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-placeholder {
    font-size: 30px;
    color: #5c3513;
    opacity: 0.5;
}

.silhouette {
    filter: brightness(0) invert(0.3);
}

/* POLICIES SECTION */
.policies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.text-card {
    display: block; /* Override flex */
    text-align: left;
    padding: 15px;
}

.card-header {
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(92, 53, 19, 0.3);
    padding-bottom: 5px;
}

.card-title {
    font-size: 16px;
    text-transform: uppercase;
    text-align: center;
}

.parchment {
    background: #fdf5e6;
    border-radius: 8px;
    padding: 15px;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    height: 100%;
}

.text-card p {
    margin-bottom: 10px;
    font-size: 13px;
    text-align: justify;
}

.icon-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.play-icon { background: white; padding: 2px 5px; border-radius: 4px; color: #4285F4; font-size: 12px;}
.green-icon { color: #0F9D58; }

.permissions { display: flex; flex-direction: column; gap: 10px; }
.wood-inner-panel {
    background: var(--wood-texture-url) center center / cover,
                var(--wood-gradient);
    background-blend-mode: multiply;
    border: 2px solid var(--wood-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dark);
}
.perm-icon {
    width: 40px; height: 40px; border-radius: 8px; background: white;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.blue-icon { color: #4285F4; }
.grey-icon { color: #757575; }

.env-card { position: relative; }
.env-bird { position: absolute; bottom: -20px; right: -20px; width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #5c3513;}


/* MEDIA QUERIES */
@media (max-width: 900px) {
    .pedia-top-row { flex-direction: column; }
    .policies-grid { grid-template-columns: 1fr; }
    .hero-character { width: 300px; bottom: -20px; }
    .giant-logo-text { font-size: 50px; }
    .giant-logo-text span { font-size: 40px; }
    .hero-balloon { width: 70px; height: 70px; }
}

@media (max-width: 600px) {
    .navbar { flex-direction: column; gap: 15px; }
    .action-buttons { flex-direction: column; }
    .card-grid { grid-template-columns: 1fr 1fr; }
    .special-grid { grid-template-columns: 1fr; }
}
