@import url('synonym.css');

:root {
    --bg-color: #000;
    --text-color: #fff;
    --border-color: #fff;

    /* extras */
    --link-color: #FF6B6B;
    --muted-color: rgba(255,255,255,0.75);
    --overlay-color: rgba(0,0,0,0.9);
    
    /* characters */
    --blue-color: #3A86FF; 
    --purple-color: #9D4EDD;
    --red-color: #FF6B6B;
}

.light-mode {
    --bg-color: #fff;
    --text-color: #000;
    --border-color: #000;

    --link-color: #c00000;
    --muted-color: rgba(0,0,0,0.7);
    --overlay-color: rgba(255,255,255,0.95);
    
    --blue-color: #2565d6;
    --purple-color: #6e39a8;
    --red-color: #b84a4a;
}

/* Targeted transitions (replaces the heavy global '*' rule) */
header, nav, footer, button, #sidebar,
.tag, .blue, .purple, .red,
#char1traits, #char2traits,
#car1traits, #car2traits, #car3traits {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* specific transitions for gallery micro-interactions */
.gallery img {
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}

/* timeline-specific transitions */
.timeline-arc {
  transition: opacity .26s ease;
}
.node-circle {
  transition: transform .18s cubic-bezier(.2,.9,.2,1), fill .18s ease, stroke-width .18s ease;
}
#timeline-highlights .highlight {
  transition: opacity .28s ease, transform .25s ease;
}
.note-box {
  transition: background-color .28s ease, color .28s ease, border-color .28s ease;
}

/* Tagline + character colors */
.tag {
  font-weight: bold;
  font-family: "Alexandria", sans-serif;
}

.blue { color: var(--blue-color); }
.purple { color: var(--purple-color); }
.red { color: var(--red-color); }

.underline-blue {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--blue-color); /* underline color */
    color: var(--text-color);                   /* text color */
    font-weight: normal;                        /* override .tag bold */
    font-family: inherit;                       /* use parent font, ignore .tag */
    transition: text-decoration-color .35s ease, color .35s ease;
}

.underline-purple {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--purple-color);  /* underline color */
    color: var(--text-color);                   /* text color */
    font-weight: normal;                        /* override .tag bold */
    font-family: inherit;                       /* use parent font, ignore .tag */
    transition: text-decoration-color .35s ease, color .35s ease;
}

.underline-red {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--red-color);/* underline color */
    color: var(--text-color);                   /* text color */
    font-weight: normal;                        /* override .tag bold */
    font-family: inherit;                       /* use parent font, ignore .tag */
    transition: text-decoration-color .35s ease, color .35s ease;
}

/* Global */
body {
    margin: 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    transition: background-color .35s ease, color .35s ease;
}

header, nav, footer, button,
#sidebar, .gallery img, 
.tag, .blue, .purple, .red,
#char1traits, #char2traits,
#car1traits, #car2traits, #car3traits {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* Sidebar */

/* Sidebar font toggles */
body.sans-serif, #sidebar.sans-serif {
    font-family: 'Synonym-Regular', Helvetica, sans-serif;
}
body.serif, #sidebar.serif {
    font-family: Georgia, "Times New Roman", Times, serif;
}

#sidebar {
    width: 250px;
    background-color: var(--bg-color);
    border-right: 2px solid var(--border-color);
    padding: 10px;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease, background-color .35s ease, border-color .35s ease;
    z-index: 1000;
}

#menu-toggle {
    display: none;
    font-size: 1.2em;
    padding: 10px;
    cursor: pointer;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100; /* higher than sidebar */
}

.nav-list {
    list-style: none;
    padding-left: 0;
}

.nav-list a {
    color: var(--text-color);
    text-decoration: none;
}

.nav-list > li {
    margin-bottom: 8px;
    font-weight: bold;
}

.nav-list li ul {
    list-style: none;
    padding-left: 15px;
    font-weight: normal;
    border-left: 1px dashed var(--border-color);
}

.nav-list li:hover > a {
    /* use current text color for glowing hover */
    text-shadow: 0 0 8px var(--text-color);
}


/* Header & Main */
header, main {
    margin-left: 270px;
    padding: 20px;
}

.glow {
  font-family: "Alexandria", sans-serif;
  font-size: 10vw;
  text-shadow: 0 0 10px var(--text-color), 
               0 0 20px var(--text-color), 
               0 0 30px var(--text-color);
}

main h1, main h2, main h3 {
    font-family: "Alexandria", sans-serif;
    font-size: 3vh;
    margin-top: 50px;
}

#car1vscar2vscar3 h3{
  font-size: 18px;
  margin-top: 10px;
}

main section {
    margin-bottom: 40px;
}

main a {
  color: var(--link-color);
  font-family: "Alexandria", sans-serif;
  text-decoration: none;
  transition: color .35s ease;
}


#glass1 {
  width: 100px;
  text-align: center;
}

/* Mobile */
@media screen and (max-width: 850px) {
  body {
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    font-size: 13px;
}
    #sidebar {
        transform: translateX(-260px);
        padding-top: 70px;
    }
    #sidebar.open {
        transform: translateX(0);
    }
    #menu-toggle {
        display: block;
    }
    header, main {
        margin-left: 0;
    }
    header h1 {
      margin-top: 50px;
    } 
    main h1, main h2, main h3 {
    font-family: Alexandria, sans-serif;
    font-size: 25px;
    text-transform: none;
    margin-top: 50px;
}

    #car1vscar2vscar3 h3{
    font-size: 18px;
    margin-top: 10px;
}
    
}
#music-player {
    position: sticky;
    bottom: 10px;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-align: center;
}

#music-player h3 {
    font-size: 1em;
    margin: 0 0 5px;
}

#track-title {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: var(--text-color);
}

#controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#controls button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 8px;
    cursor: pointer;
    font-size: 1em;
}

#controls button:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
}


.alexandria-titles {
  font-family: "Alexandria", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

#playersmap img{
  width: 100%;
  display: block;
}

/* Gallery grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.gallery img {
    width: 100%;
    height: auto;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: transform .2s ease, border-color .35s ease, box-shadow .35s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* Lightbox overlay */
#lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    justify-content: center;
    align-items: center;
}

#lightbox img {
    max-width: 90%;
    max-height: 80%;
    border: 2px solid var(--border-color);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2em;
    color: white;
    cursor: pointer;
}
/* Lightbox buttons */
#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 2100;
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    text-shadow: 0 0 8px white;
}

#activity-map-section {
  margin-top: 50px;
}

#activityMap {
  width: 100%;
  height: 80vh;
}

.bubble {
  stroke: var(--border-color);
  stroke-width: 2px;
  transition: stroke .35s ease, fill .35s ease;
  cursor: pointer;
}

.bubble-text {
  font-family: Alexandria, sans-serif;
  fill: var(--text-color);
  transition: fill .35s ease, color .35s ease;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  font-size: 0.8em;
}

/* Expanded bubble style */
.bubble.expanded {
  r: auto; /* We'll handle size in JS */
  transform: scale(1.8); /* Enlarges the bubble */
  transition: transform 0.3s ease;
}

.bubble-text.expanded {
  font-size: 1em !important; /* Make font readable when expanded */
  white-space: normal;
}

/* Character comparison container */
#char1vschar2 {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* lets it stack on smaller screens */
}

/* Each character's column */
#char1traits,
#char2traits {
    flex: 1 1 300px; /* flexible, min width 300px */
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

/* Character images */
#char1traits img,
#char2traits img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

/* Traits list */
#char1traits ul,
#char2traits ul {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
}

/* Optional: make it look nicer */
#char1traits ul li,
#char2traits ul li {
    margin-bottom: 5px;
}

/* Cars comparison container */
#car1vscar2vscar3 {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* stack on smaller screens */
}

/* Each car's column */
#car1traits,
#car2traits,
#car3traits {
    flex: 1 1 300px; /* flexible, min width 300px */
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

/* Car images */
#car1traits img,
#car2traits img,
#car3traits img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

/* Traits list */
#car1traits ul,
#car2traits ul,
#car3traits ul {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
}

/* Optional: spacing for list items */
#car1traits ul li,
#car2traits ul li,
#car3traits ul li {
    margin-bottom: 5px;
}

/* Accordion container for mobile */
#activityList {
  margin-top: 20px;
}

/* Category header */
.accordion-header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-color);
  text-align: left;
  padding: 10px 15px;
  font-family: Alexandria, sans-serif;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

/* Accordion content */
.accordion-content {
  padding-left: 15px;
}

/* Accordion item */
.accordion-item {
  margin: 5px 0;
  font-size: 0.9em;
}

  /* Quotes section */
#quotes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

#random-quote-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#random-quote-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255,255,255,0.05);
}

#random-quote-display {
    margin-top: 15px;
    font-style: italic;
    min-height: 1.5em;
    white-space: pre-wrap; /* keep line breaks */
    letter-spacing: 0.5px;
}

/* TIMELINE PERFORMANCE TWEAKS & STYLES (replace / append) */
#timeline-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 18px 12px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
  margin-left: 270px;
  will-change: scroll-position;
}

@media screen and (max-width:850px) {
  #timeline-container { margin-left: 0; padding: 12px 8px; }
}

/* Use viewBox-friendly behavior: keep stroke widths visually stable */
.timeline-arc {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.18;
  transition: stroke-dashoffset 640ms cubic-bezier(.2,.9,.2,1), opacity 260ms ease;
  will-change: stroke-dashoffset, opacity;
  /* avoid expensive drop-shadow on mobile; keep things simple */
  filter: none;
  vector-effect: non-scaling-stroke;
}

/* GPU-accelerate node transforms */
.node-circle {
  stroke: var(--border-color);
  fill: var(--bg-color);
  transition: transform .18s cubic-bezier(.2,.9,.2,1), fill .18s ease, stroke-width .18s ease;
  will-change: transform, opacity;
  transform-origin: center center;
  backface-visibility: hidden;
}

/* active node */
.node-circle.active {
  transform: scale(1.22);
  stroke-width: 3.2;
  fill: var(--text-color);
}

/* text */
.node-label, .node-title {
  fill: var(--text-color);
  pointer-events: none;
}

/* small accessibility focus ring when keyboard nav used */
.node:focus { outline: none; }
.node:focus .node-circle { stroke-width: 3.6; transform: scale(1.18); }

/* ensure svg doesn't force extra paint layers */
#timeline-svg {
  display: block;
  height: 220px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* small tweak so highlight text changes are smooth */
#timeline-highlights .highlight { display: none; opacity: 0; transition: opacity .28s ease; }
#timeline-highlights .highlight.active { display: block; opacity: 1; }

/* TIMELINE POLISH */
#timeline-section { margin-top: 28px; }
#timeline-container {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
  padding: 14px 8px;
}

/* base line */
.timeline-base-line {
  stroke: rgba(255,255,255,0.06);
  stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
}

/* arc color helpers */
.arc-blue { stroke: var(--blue-color); }
.arc-purple { stroke: var(--purple-color); }
.arc-red { stroke: var(--red-color); }

/* node label micro-motion */
.node-title {
  font-family: Alexandria, sans-serif;
  font-size: 0.9rem;
  transform: translateY(-6px);
  opacity: 0.92;
  transition: transform .22s ease, opacity .22s ease;
}

/* when active -> lift the title slightly */
.node.active .node-title { transform: translateY(-12px); opacity: 1; }

/* highlight block style (above line) */
#timeline-highlights {
  padding: 6px 0 10px;
  font-size: 0.95rem;
  color: var(--muted-color);
  min-height: 2.2em;
}
#timeline-highlights .highlight {
  display:block;
  opacity:0;
  transform: translateY(6px);
}
#timeline-highlights .highlight.active {
  opacity:1;
  transform: translateY(0);
}

/* details area */
#timeline-details { margin-left: 0; max-width: 100%; box-shadow:none; border-radius:8px; padding:12px; }

/* Make nodes slightly larger on touch devices */
@media (pointer:coarse) {
  .node-circle { r: 16px; }
  .node-label { font-size:0.95rem; }
}

/* Wire Notes Section */
#wire-notes {
    margin-top: 40px;
}

#wire-notes li {
  margin-bottom: 10px;
}

.notes-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* wrap on small screens */
}

.note-box {
    flex: 1 1 300px; /* min width 300px, flexible on desktop */
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 15px;
    box-sizing: border-box;
    max-height: none; /* allow natural height */
    transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* Mobile layout: stack vertically, shrink boxes */
@media screen and (max-width: 850px) {
    .notes-container {
        flex-direction: column;
        gap: 15px; /* slightly smaller gap on mobile */
    }

    .note-box {
        flex: 1 1 auto; /* allow box to shrink naturally */
        padding: 10px;  /* less padding so box isn't too tall */
    }
}
