/* Base */
:root{
    --bg:#061028;
    --muted:#dbeeff;
    --accent:#00BFFF; /* bright sky blue */
    --accent2:#5d60ff; /* purple-blue */
    --card-grad: linear-gradient(135deg,var(--accent),var(--accent2));
}
.accent { color: var(--accent); text-shadow: 0 6px 18px rgba(93,96,255,0.06); }
* { margin:0; padding:0; box-sizing:border-box; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
body { color: var(--muted); background: linear-gradient(180deg,#020617,var(--bg)); overflow-x:hidden; }

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(0, 0, 0, 0.2); /* Transparent background */
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px); /* optional: blur behind navbar */
    overflow: visible; /* allow hamburger to overflow without being clipped */
}

/* Website logo */
nav .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 6px 18px rgba(93,96,255,0.06);
}

/* Brand: enlarge the image inside .logo and show the site name to the right */
/* Logo: enlarge image visually while preserving navbar height */
nav .logo {
    display: inline-flex;
    align-items: center;
}

nav .logo img {
    /* increase visual size without increasing nav padding: use transform scale */
    height: 56px; /* reasonable baseline that fits navbar */
    width: auto;
    display: block;
    transform-origin: left center;
    transition: transform 180ms ease;
}

/* Slightly scale up the image for a bigger look but keep layout flow unaffected */
nav .logo img {
    transform: scale(1.15);
}

@media (max-width: 800px) {
    nav .logo img { height: 48px; transform: scale(1); }
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent */
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

/* (secondary logo rule) keep subtle brand look */
nav .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 6px rgba(93,96,255,0.06);
}

/* Navbar links */
nav .nav-links a {
    margin-left: 20px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.18s, text-shadow 0.18s;
}

nav .nav-links a:hover {
    color: var(--accent2);
    /* subtle white-ish glow on hover */
    text-shadow: 0 6px 20px rgba(255,255,255,0.08);
}

/* Hero */
.hero {
    text-align:center; padding:120px 20px; position:relative;
}
.hero h1 { font-size:50px; color: #ffffff; }
.hero p { font-size:18px; max-width:700px; margin:15px auto; color: rgba(235,245,255,0.9); }
.get-started {
    align-items: center;
    background-image: linear-gradient(144deg, var(--accent2), var(--accent2) 50%, var(--accent));
    border: 0;
    border-radius: 8px;
    box-shadow: rgba(93,96,255,0.18) 0 15px 30px -5px;
    box-sizing: border-box;
    color: #ffffff;
    display: inline-flex;
    font-size: 18px;
    justify-content: center;
    line-height: 1em;
    max-width: 100%;
    min-width: 140px;
    padding: 3px;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.get-started:active,
.get-started:hover {
    outline: 0;
}

.get-started span {
    background-color: rgba(5,6,45,0.95);
    padding: 14px 22px;
    border-radius: 6px;
    width: 100%;
    height: 100%;
    transition: 300ms;
    display: inline-block;
}

.get-started:hover span {
    background: transparent;
}

.get-started:active {
    transform: scale(0.95);
}

/* About Section */
.about { padding:80px 50px; text-align:center; }
.about h2 { font-size:36px; color: var(--accent); margin-bottom:20px; }
.about p { max-width:800px; margin:0 auto 20px; color: rgba(235,245,255,0.9); }

/* Cards */
.cards {
    display:flex; flex-wrap:wrap; justify-content:center; gap:30px;
    padding:80px 50px;
}
.card {
    background: var(--card-grad); width:260px;
    padding:26px 18px; border-radius:14px; text-align:center; color: #e9f4ff; font-weight:700;
    transition: transform 0.28s, box-shadow 0.28s; cursor:pointer;
}
.card:hover {
    transform: translateY(-10px);
    /* brighten with a soft white glow on hover */
    box-shadow: 0 20px 40px rgba(255,255,255,0.08);
}
.card h3 { margin-bottom:15px; color: var(--accent2); }
.card p { font-weight:normal; color: #e9f4ff; }

/* Footer */
footer { text-align:center; padding:40px 20px; background: transparent; }
footer p { color: rgba(235,245,255,0.7); }

/* Canvas */
#bgCanvas { position:fixed; top:0; left:0; width:100%; height:100%; z-index:-1; }

/* Hamburger button (hidden on desktop) */
.hamburger {
    display: none;
    width: 40px;
    height: 28px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: transparent; /* remove default button box */
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    z-index: 205; /* sit above nav-links */
}
.hamburger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 10%, var(--accent2) 90%);
    border-radius: 4px;
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.18s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

/* Mobile behavior */
@media (max-width: 800px) {
    nav { padding: 12px 18px; }
    /* ensure hamburger is visually separated from nav background */
    .logo img { height: 64px; }
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(4,10,30,0.95);
        width: 240px;
        transform-origin: top right;
        transform: scaleY(0);
        transition: transform 0.22s ease;
        display: flex;
        flex-direction: column;
        padding: 12px 12px;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        box-shadow: 0 12px 40px rgba(2,6,23,0.6);
    }
    .nav-links a { margin: 10px 0; color: var(--muted); font-weight:600; padding:8px 10px; border-radius:8px; text-decoration:none; }
    .nav-links.show {
        transform: scaleY(1);
    }
    .hamburger { display: block; }
    .hamburger:hover span, .hamburger:focus span {
        box-shadow: 0 0 8px rgba(93,96,255,0.45), 0 0 6px rgba(93,96,255,0.12);
    }
    /* When hamburger is active, animate bars into an X */
    .hamburger.active span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }
}

/* Remove focus outline but keep accessible visible focus using box-shadow if desired */
.hamburger:focus { outline: none; }

.cards a.card {
    display: block;
    text-decoration: none;
    color: #e9f4ff; /* softer off-white for card anchor text */
}
.cards a.card:hover {
    transform: translateY(-10px);
    /* card links now glow white instead of gold */
    box-shadow: 0 15px 30px rgba(255,255,255,0.12);
}

/* AI/chat-related styles removed to simplify stylesheet */

/* Card links neon hover */
.cards a {
    color: #585af1;
    text-decoration: none;
    transition: 0.3s;
}

.cards a:hover {
    color: #5d60ff;
    text-shadow: 0 0 6px rgba(255,255,255,0.08); /* white neon glow */
}

/* Links inside card content (not the card tiles themselves) should glow white on mouse hover.
   Also include PDF links (a[href$=".pdf"]) and add focus-visible styles for keyboard users. */
.cards a:not(.card):hover,
.cards a:not(.card):focus-visible,
.card a:hover,
.card a:focus-visible,
.card p a:hover,
.card-table-cell a:hover,
.card-table-cell a:focus-visible,
.worksheets-table a:hover,
a[href$=".pdf"]:hover,
a[href$=".pdf"]:focus-visible {
    color: #ffffff; /* white on hover */
    /* white glow */
    text-shadow: 0 0 12px rgba(255,255,255,0.18), 0 8px 24px rgba(255,255,255,0.08);
    transition: color 0.14s, text-shadow 0.14s, box-shadow 0.14s;
    outline: none;
}

/* Visible focus ring for keyboard navigation (keeps blue hint) */
.cards a:not(.card):focus-visible,
.card a:focus-visible,
.card-table-cell a:focus-visible,
a[href$=".pdf"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(0,191,255,0.12);
}

/* Default link color for links inside cards/table cells: use theme blue like worksheets */
.card p a,
.cards a:not(.card),
.card-table-cell a,
.worksheets-table a,
a[href$=".pdf"] {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.18s, text-shadow 0.18s;
}

.worksheets-table th {
    background: linear-gradient(135deg, #4a4a9e, #6e5abf); /* purple-blue gradient like cards */
    color: white;
}

.worksheets-table td {
    background: #1a1a2e; /* dark background similar to cards */
    color: #fff;
}

.worksheets-table a {
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s;
}

.worksheets-table a:hover {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255,255,255,0.16), 0 6px 16px rgba(255,255,255,0.06);
}

.cards-table {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0;
}

.card-table-cell {
    background: linear-gradient(135deg, var(--accent), var(--accent2)); /* match main cards */
    color: #e9f4ff; /* softer off-white for card-table text */
    padding: 20px;
    border-radius: 12px;
    width: 250px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-table-cell h3 {
  text-align: center;
  margin-bottom: 15px;
}

.card-table-cell a {
    color: #e9f4ff; /* links inside card-table cells default to softer off-white */
    text-decoration: none;
    display: block;
    margin: 5px 0;
    transition: 0.3s;
}

.card-table-cell a:hover {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255,255,255,0.16), 0 8px 24px rgba(255,255,255,0.08);
}

.card-table-cell:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Make all section titles and headings purple across the site */
h2, h3 {
        color: var(--accent2);
}

/* Specific override: in IB book/worksheet pages, make the PDF and worksheet links glow blue like other links */
.card p a:hover,
.worksheets-table a:hover,
.card-table-cell a:hover,
a[href$=".pdf"]:hover {
        color: var(--accent);
        text-shadow: 0 0 12px rgba(0,191,255,0.18), 0 6px 18px rgba(0,191,255,0.08);
}

/* Chat/AI styles removed */

input[type="text"] {
    width: 250px;
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    border: 2px solid var(--accent2);
    border-radius: 10px;
    padding: 12px;
    margin: 5px;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 8px rgba(255,255,255,0.12);
    outline: none;
}

button {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    margin: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.12);
    opacity: 0.95;
}

.delete-btn {
    background: var(--accent2);
    color: #000;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.delete-btn:hover {
    background: #ffffff;
    opacity: 0.95;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body > * {
  flex-shrink: 0;
}

main {
  flex: 1;
}

/* Content links: default white, hover to theme blue with glow (like worksheets) */
main a,
.about a,
.cards a:not(.card),
.card p a,
.card-table-cell a,
.worksheets-table a,
a[href$=".pdf"] {
    color: #ffffff; /* default white */
    text-decoration: none;
    transition: color 0.18s, text-shadow 0.18s;
}

main a:hover,
.about a:hover,
.cards a:not(.card):hover,
.card p a:hover,
.card-table-cell a:hover,
.worksheets-table a:hover,
a[href$=".pdf"]:hover {
    color: var(--accent); /* theme blue on hover */
    text-shadow: 0 0 12px rgba(0,191,255,0.18), 0 6px 18px rgba(0,191,255,0.08);
}

/* Keep keyboard focus visible (blue ring) */
main a:focus-visible,
.about a:focus-visible,
.card p a:focus-visible,
.card-table-cell a:focus-visible,
.worksheets-table a:focus-visible,
a[href$=".pdf"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(0,191,255,0.12);
}

/* Divider/separator used across pages (About page) */
.divider {
    text-align: center;
    color: #e9f4ff; /* softer off-white */
    margin: 40px 0;
    font-weight: bold;
    letter-spacing: 4px;
}
