/*
Theme Name: RLE Kids App
Theme URI: https://rakuluckenglish.com/
Author: Antigravity
Author URI: https://rakuluckenglish.com/
Description: A simple, lightweight, kid-friendly PWA theme for Rakuluck English.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rlekids
*/

:root {
    --app-bg: #f0fdf4;
    /* Light mint background */
    --app-primary: #3b82f6;
    /* Friendly blue */
    --app-secondary: #fef08a;
    /* Yellow */
    --app-accent: #10b981;
    /* Green */
    --app-text: #1f2937;
    --nav-height: 70px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Fix iOS rubberband bounce */
    font-family: 'Outfit', sans-serif;
    background-color: var(--app-bg);
    color: var(--app-text);
    -webkit-font-smoothing: antialiased;
}

body.logged-in .app-container {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

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

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    height: 100%;
    overflow-y: auto;
    /* Allow scrolling inside container */
    -webkit-overflow-scrolling: touch;
    /* Smooth iOS scrolling */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.app-content {
    padding: 20px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    border-bottom: 1px solid #f3f4f6;
}

.app-header img {
    max-height: 40px;
}

.app-header h1 {
    font-size: 18px;
    margin: 0;
    color: var(--app-primary);
    font-weight: 800;
}

.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    transform: translateZ(0);
    /* Hardware acceleration to stop bouncing */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #9ca3af;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
}

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

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
}

.nav-item:active {
    transform: scale(0.9);
}

/* Base styles for WP generated content */
p {
    line-height: 1.6;
}

.logout-btn {
    font-size: 13px;
    color: #ef4444;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: #fee2e2;
    text-decoration: none;
    transition: background-color 0.2s;
}

.logout-btn:active {
    background-color: #fca5a5;
}