:root {
    --primary-gold: #ffcc00; /* The gold color from the top bar */
    --dark-text: #333;
    --light-text: #fff;
    --border-light: #eee;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --body-bg: #f5f5f5; /* A very light grey for overall background */
    --card-bg: #fff;
    --ink: #1d1b2a;
    --ink-soft: #3d3952;
}
body {
    font-family: 'Fredoka', 'Arial', sans-serif;
    font-weight: 500;
    margin: 0;
    padding: 0;
    background-color: var(--body-bg);
    display: flex; /* Use flexbox for the main layout */
    justify-content: center; /* Center the app container */
    align-items: flex-start; /* Align to top */
    min-height: 100vh; /* Full viewport height */
}

/* Outer container to simulate phone screen */
#app-container {
    width: 100%;
    max-width: 450px; /* Typical phone width range */
    background-color: #fff; /* White background for the app content */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures it stretches if content is short */
}

/* Header Styling */
.app-header {
    display: none; /* Hide the yellow banner */
}

.menu-icon, .notification-icon {
    font-size: 1.5em;
    cursor: pointer;
}

/* Main Content Area */
.main-content {
    flex-grow: 1; /* Allows main content to take available vertical space */
    padding: 20px;
    padding-bottom: 96px;
    overflow-y: auto; /* Enables scrolling if content overflows */
    background: #f9eee3;
}

.options-section {
    margin-bottom: 25px;
    position: relative; /* For positioning the add button */
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.options-section h2 {
    color: var(--dark-text);
    font-size: 1.8em;
    margin-bottom: 10px;
    text-align: center;
}

.search-label {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.add-button {
    display: none; /* Hidden as requested */
}

.add-button:hover {
    background-color: #45a049;
}

.back-button {
    margin-left: 0;
    margin-top: 8px;
    padding: 8px 14px;
    background: #e0e7ff;
    border: 1px solid #b7c2ff;
    border-radius: 20px;
    color: #1f3a93;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.refresh-button {
    align-self: center;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid #c9d3ff;
    background: #f4f7ff;
    color: #1f3a93;
    font-weight: 600;
    cursor: pointer;
}

.refresh-button:active {
    transform: translateY(1px);
}

.back-button.hidden {
    display: none;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ffd6e8;
    border-radius: 28px;
    padding: 10px 14px;
    background: linear-gradient(120deg, #fff7fb 0%, #ffe6f2 100%);
    box-shadow: 0 4px 12px rgba(255, 165, 200, 0.25);
    transition: all 0.25s ease;
    width: min(90%, 360px);
}

.search-bar.collapsed {
    width: 34px;
    height: 31px;
    padding: 7px;
    justify-content: center;
    gap: 0;
    cursor: pointer;
}

.search-bar.collapsed .search-input {
    display: none;
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 8px 4px;
    font-size: 1em;
    background: transparent;
    color: #444;
}

.search-input::placeholder {
    color: #a77ea1;
}

.search-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #ffb3cc 0%, #ffcce0 100%);
    color: #7b3d6e;
    font-size: 1.2em;
    box-shadow: 0 2px 6px rgba(123, 61, 110, 0.25);
}


/* Lessons List (Container for cards) */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between lesson cards */
    padding: 0 12px; /* Pull cards away from screen edges */
}

/* Individual Lesson Card Styling (The items like "A / An", "Science Experiment") */
.lesson-card {
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at center, #ffffff 70%, #f2f8ff 90%, #cfe5ff 100%);
    border: 5px #000000;
    box-shadow: inset 0 0 0 2px #7fbaff, inset 0 0 32px 18px #d7ebff, 0 10px 24px rgba(120, 170, 220, 0.35);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-box-reflect: below 2px linear-gradient(transparent 10%, rgba(120, 170, 220, 0.22) 100%);
}

.lesson-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lesson-badge.free {
    background: #e7f8ed;
    color: #11623a;
    border: 1px solid #bce7cd;
}

.lesson-badge.locked {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lesson-thumbnail {
    width: 60px; /* Fixed size for the thumbnail */
    height: 60px;
    border-radius: 55px; /* Slightly rounded corners for images */
    object-fit: cover; /* Ensures image covers the area without distortion */
    transform: scale(1);
    margin-right: 15px;
}

.lesson-info {
    flex-grow: 1; /* Allows info to take available space */
    text-align: left;
}

.lesson-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.15em;
    color: var(--dark-text);
}

.lesson-info p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.forward-arrow {
    font-size: 1.5em;
    color: #999;
    margin-left: 15px;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 32px));
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(29, 27, 42, 0.12);
    border-radius: 22px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 18px 40px rgba(31, 30, 51, 0.18);
    z-index: 2;
}

.nav-button {
    border: none;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink-soft);
    padding: 8px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-button img {
    width: 51px;
    height: 48px;
}

.nav-button.active {
    background: linear-gradient(135deg, rgba(255, 123, 93, 0.2), rgba(244, 86, 78, 0.2));
    color: var(--ink);
    transform: translateY(-2px);
}

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

/* Account screen (in-app) */
#account-screen {
    display: none;
    padding-bottom: 140px;
}

#account-screen .account-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#account-screen .account-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(29, 27, 42, 0.12);
    box-shadow: 0 18px 40px rgba(31, 30, 51, 0.16);
    /* margin-top: 100px; */
}

#account-screen .account-title {
    margin: 0 0 6px;
    font-size: 1.2em;
    color: #1d1b2a;
}

#account-screen .account-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1d1b2a;
    font-size: 23px;
}

#account-screen .account-brand img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
}

#account-screen .account-subtitle {
    margin: 0 0 14px;
    color: #3d3952;
    font-size: 0.9em;
}

#account-screen .status-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 6px;
}

#account-screen .status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(29, 27, 42, 0.08);
    font-size: 0.95em;
}

#account-screen .status-item span {
    color: #3d3952;
}

#account-screen .status-item strong {
    color: #1d1b2a;
}

#account-screen .login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
    
    
}

#account-screen .login-form button {
    color: white;
    background: linear-gradient(135deg, #ff7b5d, #f4564e);
    box-shadow: 0 14px 30px rgba(244, 86, 78, 0.28);
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.95em;
    font-weight: 700;
}

#account-screen label {
    font-weight: 700;
    font-size: 0.9em;
    color: #333;
}

#account-screen input {
    border-radius: 12px;
    border: 1px solid rgba(29, 27, 42, 0.18);
    padding: 12px 14px;
    font-size: 1em;
}

#account-screen .button-row {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

#account-screen .primary-button,
#account-screen .secondary-button,
#account-screen .ghost-button {
    border: 20px;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    color: white;
    
}

#account-screen .primary-button {
    color: white;
    background: linear-gradient(135deg, #ff7b5d, #f4564e);
    box-shadow: 0 14px 30px rgba(244, 86, 78, 0.28);
}

#account-screen .secondary-button {
    background: rgba(29, 27, 42, 0.06);
    color: #1d1b2a;
}

#account-screen .ghost-button {
    color: #1d1b2a;
    background: rgba(29, 27, 42, 0.06);
    /* box-shadow: 0 14px 30px rgba(244, 86, 78, 0.28); */
    border: none;
    margin-top: 20px;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95em;
    font-weight: 700;
}

.status-badge {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
  }
  
  .status-locked {
    background: rgba(0,0,0,0.06);
  }
  
  .status-unlocked {
    background: rgba(0, 160, 80, 0.12);
  }
  
  .premium-box {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgb(254, 220, 220);
  }
  
  .premium-title {
    margin: 0 0 6px 0;
  }
  
  .premium-sub {
    margin: 0 0 10px 0;
    opacity: 0.85;
  }
  
  .premium-list {
    margin: 0 0 12px 18px;
  }
  
  .price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 10px 0 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.08);
  }
  
  .price-value {
    font-weight: 800;
  }
  
  .primary-btn {
    width: 100%;
  }
  
  .ghost-btn {
    background: transparent;
    border: 2px solid rgba(0,0,0,0.2);
    padding: 10px 14px;
    border-radius: 12px;
  }
