/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

:root {
    /* Color Palette */
    --rich-black: #03071eff;
    --chocolate-cosmos: #37071eff; /* double-check hex if needed */
    --rosewood: #6a040fff;
    --penn-red: #9d0208ff;
    --engineering-orange: #d00000ff;
    --sinopia: #dc2f02ff;
    --persimmon: #e85d04ff;
    --princeton-orange: #f48c06ff;
    --orange-web: #faa307ff;
    --selective-yellow: #ffba08ff;
    --snow-white: #FFFFFF;
    --celestial-teal: #84DCC6;
    --mint-breeze: #A5FFD6;
    --peach-blush: #FFA69E;
    --coral-rose: #FF686B;
    --sapphire-blue: #2364AA;
    --midnight-navy: #13283F;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

/* Full viewport container using a dynamic height variable */
.full-pane-container {
    display: flex;
    flex-direction: column;
    height: calc(var(--vh, 1vh) * 100);
    width: 100vw;
}

/* Header / Menu */
.menu-container {
    flex: 0 0 auto;
    width: 100%;
    padding: 1rem;
    background-color: #222;
    color: #fff;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2000; /* Highest layer for header */
}

.menu-container h1 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    animation: glow 1.5s infinite alternate;
}

/* Hamburger Button */
.hamburger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    z-index: inherit; /* Inherits header's z-index */
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: #fff;
    left: 0;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

/* Mobile Navigation Menu */
.mobile-nav {
    background-color: #222;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 2100; /* Above header content */
    font-size: 1rem;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    padding: 1rem;
    border-bottom: 1px solid #444;
    color: #fff;
    cursor: pointer;
}

.mobile-nav li:hover {
    background-color: #333;
}

/* Utility class */
.hidden {
    display: none !important;
}

#compass-container.hidden {
    display: none !important;
}

/* Main content area */
.main-content-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    overflow: hidden;
}

/* Input & Narrative Input Areas */
.input-container,
#narrative-input {
    flex: 0 0 auto;
}

/* Cool content container (initially hidden) */
.cool-content-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

/* ==========================================================================
   Component Styles
   ========================================================================== */

/* Entry Screen */
.entry-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #2f2f2f;
}

.svg-container {
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 800px;
}

.svg-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

svg polygon {
    transition: transform 0.15s ease-in-out;
}

.clicked {
    transform: scale(0.95);
}

/* Visual & Boring Content Panes */
.boring-content-container {
    flex: 1 1 40%;
    position: relative;
    overflow: auto;
}

.visual-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

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

/* New Video Pane */
.video-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1800;  /* Above vertical-image-pane, compass, and audio pane but below narrative overlay and header */
    display: flex;
    background-color: black;
    opacity: 1;
    transition: opacity 1s ease;
}

.video-pane.fade-out {
    opacity: 0;
}

.video-pane video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio Pane */
.audio-pane {
    position: absolute;
    display: flex;
    top: 10px;
    left: 10px;
    z-index: 1500;
    padding: 2px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.5);
}

.audio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.audio-icon, .narrative-icon, .background-icon {
    cursor: pointer;
    position: relative;
    font-size: 3em;
    padding: 2px;
}

/* Removed the red slash overlay pseudo-element */
.audio-icon.muted::after {
    content: none;
}

#audio-player {
    width: 100%;
}

#image-pane {
    display: none;
}

/* Input Area */
.input-container textarea {
    width: 100%;
    max-width: 800px;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #444;
    border-radius: 4px;
}

/* Narrative Input */
#narrative-input {
    display: flex;
    position: relative;
    width: 100%;
    padding: 0;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 4px;
}

#narrative-input-field {
    width: 100%;
    padding: 10px 60px 10px 10px;
    border: 1px solid #444;
    background-color: transparent;
    border-radius: 4px;
    font-size: 1rem;
    font-family: Merriweather, serif;
}

#narrative-input-send {
    right: 15px;
    bottom: 15px;
    padding: 0.5rem 1rem;
    background-color: var(--selective-yellow);
    border: none;
    color: #222;
    border-radius: 4px;
    cursor: pointer;
}

/* Interactive Pane & Music Container */
.interactive-pane {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.music-container {
    flex: 1;           /* Allow it to grow and fill available space */
    width: 100%;
    height: 100%;
    margin: 0;         /* Remove margin */
    padding: 0;        /* Remove extra padding */
    display: block;    /* Ensure it's visible when switching views */
}

/* Make sure the SVG inside fills the container */
.music-container svg {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or "contain" based on your design preference */
}



/* Musical SVG & Notes */
.note {
    stroke: #333;
    stroke-width: 2;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease, fill 0.3s ease;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.5));
}

.note:active {
    transform: translateY(5px) scale(0.98);
    filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.7));
}

#note-c  { fill: var(--rosewood); }
#note-d  { fill: var(--penn-red); }
#note-e  { fill: var(--engineering-orange); }
#note-f  { fill: var(--sinopia); }
#note-g  { fill: var(--persimmon); }
#note-a  { fill: var(--princeton-orange); }
#note-b  { fill: var(--orange-web); }
#note-c2 { fill: var(--selective-yellow); }

#center-octagon path {
    fill: var(--chocolate-cosmos) !important;
}

.music-container svg {
    width: 100%;
    height: auto;
    max-height: 400px;
    background-color: #fff;
}

/* Compass */
#compass-container {
    width: 220px;
    margin: 50px auto;
    text-align: center;
    display: flex;
    z-index: 1100; /* Below video pane but above music container */
}

#compass-container .compass-arrow polygon {
    transition: fill 0.3s ease-in-out;
}

.compass-arrow {
    cursor: pointer;
}

svg {
    display: block;
    margin: 0 auto;
}

/* Blockquote */
#block-quote blockquote {
    border-left: 5px solid #007bff;
    padding-left: 20px;
    font-style: italic;
    background-color: #f8f9fa;
    margin: 2rem auto;
    max-width: 800px;
    position: relative;
}

#block-quote blockquote:before {
    content: "\201C";
    font-size: 4rem;
    color: #007bff;
    position: absolute;
    top: -20px;
    left: -10px;
}

#block-quote blockquote:after {
    content: "\201D";
    font-size: 4rem;
    color: #007bff;
    position: absolute;
    bottom: -20px;
    right: -10px;
}

#block-quote .blockquote-footer {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1rem;
}

/* Mobile Entry Pane */
.mobile-entry-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background-color: #111;
    min-height: 100vh;
}

.mobile-entry-logo {
    margin-bottom: 1.5rem;
    text-align: center;
}

.mobile-entry-logo img {
    max-width: 200px;
    height: auto;
}

.entry-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    width: 100%;
}

.entry-tile {
    background-color: #222;
    color: #fff;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.entry-tile:hover {
    background-color: #333;
}

/* ==========================================================================
   Vertical Image Pane & Overlay
   ========================================================================== */

.vertical-image-pane {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: auto;
}

.vertical-image-pane img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vertical-image-pane #compass-container {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1000; /* Already set above in Compass */
    width: 220px;
    display: flex;
    text-align: center;
}

/* Narrative Overlay (set above interactive elements) */
.narrative-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 33%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.5s ease;
    overflow: hidden; /* Hide overflow on container */
    box-sizing: border-box;
    z-index: 1999; /* Above video pane and interactive content, same as header if needed */
    min-height: 50px;
    max-height: 80%;
}

/* Resize handle for narrative overlay */
.narrative-resize-handle {
    flex: 0 0 12px; /* Fixed height, won't grow or shrink */
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    cursor: ns-resize;
    transition: background 0.2s ease;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    z-index: 2000; /* Above narrative overlay content */
    position: relative; /* For ::after positioning */
}

/* Make resize handle larger and more visible on touch devices */
@media (hover: none) and (pointer: coarse) {
    .narrative-resize-handle {
        flex: 0 0 20px; /* Larger fixed height for touch */
        background: rgba(255, 255, 255, 0.4);
        border-top: 3px solid rgba(255, 255, 255, 0.6);
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .narrative-resize-handle::after {
        content: "━━━━━━━━━━";
        color: rgba(255, 255, 255, 0.8);
        font-size: 12px;
        pointer-events: none;
        line-height: 1;
    }
}

.narrative-resize-handle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.narrative-resize-handle:active {
    background: rgba(255, 255, 255, 0.5);
}

#narrative-text, .narrative-text {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
    font-size: clamp(0.7rem, 1.5vw, 1rem); /* Responsive base font size */
    font-family: Merriweather, serif;
    line-height: 1.6;
    color: white;
    white-space: pre-line;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    width: 100%;
}

#narrative-text p, .narrative-text p {
    margin-bottom: 1em;
}

/* Skills display specific styling */
#narrative-text p.skills-display,
.narrative-text p.skills-display {
    text-align: left !important;
    font-family: Merriweather, serif;
    white-space: pre;
    display: block;
    margin: 0;
    padding: 0 20px;
    line-height: 1.4;
    font-size: clamp(0.65rem, 1.5vw, 0.9rem); /* Responsive font size */
}

#narrative-text p.skills-header,
.narrative-text p.skills-header {
    text-align: center;
    font-family: Merriweather, serif;
    white-space: normal;
    margin: 0.5em 0;
    font-size: clamp(0.7rem, 1.6vw, 1rem); /* Slightly larger for headers */
}

/* Skills grid container - responsive columns */
#narrative-text .skills-grid-container,
.narrative-text .skills-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0 20px;
    padding: 0 20px;
    margin: 10px 0;
}

/* Individual skill items in the grid */
#narrative-text .skill-item,
.narrative-text .skill-item {
    font-family: Merriweather, serif;
    white-space: pre;
    text-align: left;
    padding: 2px 0;
    font-size: clamp(0.65rem, 1.5vw, 0.9rem); /* Responsive font size */
}

/* Media queries for different screen sizes */
@media (max-width: 768px) {
    /* Mobile: force 2 columns max, smaller font */
    #narrative-text .skills-grid-container,
    .narrative-text .skills-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        max-width: 100%;
    }
    
    #narrative-text .skill-item,
    #narrative-text p.skills-display {
        font-size: 0.65rem;
    }
    
    #narrative-text p.skills-header {
        font-size: 0.75rem;
    }
}

@media (min-width: 1200px) {
    /* Large screens: allow more columns, medium font */
    #narrative-text .skills-grid-container,
    .narrative-text .skills-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    #narrative-text .skill-item,
    #narrative-text p.skills-display {
        font-size: 0.8rem;
    }
    
    #narrative-text p.skills-header {
        font-size: 0.9rem;
    }
}

@media (min-width: 1600px) {
    /* Extra large screens: even more columns, larger font */
    #narrative-text .skills-grid-container,
    .narrative-text .skills-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    #narrative-text .skill-item,
    #narrative-text p.skills-display {
        font-size: 0.9rem;
    }
    
    #narrative-text p.skills-header {
        font-size: 1rem;
    }
}

/* Toggle Overlay Button (above narrative overlay) */
.toggle-overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1999;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-overlay-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.interactive-icon-pane {
    display: flex;
    position: absolute;
    bottom: 2%;
    width: 100%;
    justify-content: space-between;
}

.interactive-icon {
    display: flex;
    width: 10rem;
    z-index: 2000000;
}

@keyframes sanityÃ¢â‚¬â€˜pulse {
    0%   { boxÃ¢â‚¬â€˜shadow: 0 0 0 0 rgba(255,0,0,0); }
    50%  { boxÃ¢â‚¬â€˜shadow: 0 0 0 10px rgba(255,0,0,0.3); }
    100% { boxÃ¢â‚¬â€˜shadow: 0 0 0 0 rgba(255,0,0,0); }
}

/* Three-dots settings button */
.settings-button {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    margin-left: auto; /* Pushes to right side */
    padding: 0.5rem;
    color: #fff; /* White or adjust to your navbar color */
}

/* Three-dots icon style */
.settings-icon {
    font-weight: bold;
    font-size: 1.8rem;
}

/* Settings dropdown menu */
.settings-menu {
    position: absolute;
    top: 100%; /* Adjust depending on navbar height */
    right: 0;
    background: #333; /* Dark background */
    border: 1px solid #555;
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 2200;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Hidden by default */
.hidden {
    display: none;
}

/* Settings menu items */
.settings-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.settings-menu li {
    padding: 0.5rem 1rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.settings-menu li:hover {
    background-color: #555;
}

/* Give all your injected sliders a class */
.volume-slider {
    /* set overall height */
    height: 6px;
    /* remove default appearance */
    -webkit-appearance: none;
    background: #444;              /* track color */
    border-radius: 3px;
    outline: none;
}

/* WebKit/Blink track */
.volume-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: #444;
    border-radius: 3px;
}

/* WebKit/Blink thumb */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;  height: 16px;
    border-radius: 50%;
    background: #FFD43B;           /* your slider-knob color */
    cursor: pointer;
    margin-top: -5px;  /* vertically center on track */
}

/* Firefox */
.volume-slider::-moz-range-track {
    height: 6px;
    background: #444;
    border-radius: 3px;
}
.volume-slider::-moz-range-thumb {
    width: 16px;  height: 16px;
    border: none;
    border-radius: 50%;
    background: #FFD43B;
    cursor: pointer;
}

/* IE */
.volume-slider::-ms-track {
    height: 6px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}
.volume-slider::-ms-fill-lower {
    background: #444;
    border-radius: 3px;
}
.volume-slider::-ms-fill-upper {
    background: #444;
    border-radius: 3px;
}
.volume-slider::-ms-thumb {
    width: 16px;  height: 16px;
    border-radius: 50%;
    background: #FFD43B;
    cursor: pointer;
    margin-top: 0; /* IE positions differently */
}


/* ==========================================================================
   Skills Display Styles
   ========================================================================== */

/* Center-align all narrative text by default */
#narrative-text {
    text-align: center;
}

/* Skills grid container - left-align for better readability */
#narrative-text .skills-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0 20px;
    padding: 0 20px;
    margin: 10px 0;
    text-align: left;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-family: Merriweather, serif;
}

/* Individual skill items */
#narrative-text .skills-item {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre;
    padding: 2px 0;
    text-align: left;
    font-size: inherit;
}

/* Headers - keep centered */
#narrative-text .skills-section-header {
    text-align: center;
    margin: 10px 0;
    font-size: inherit;
}

/* Footer content - keep centered */
#narrative-text .skills-footer {
    text-align: center;
    margin: 5px 0;
    font-size: inherit;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media (min-width: 769px) {
    .interactive-pane {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
    }
    #vertical-image-pane,
    .music-container {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .full-pane-container,
    .input-container,
    #narrative-input {
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
    .vertical-image-pane #compass-container {
        bottom: calc(10% + env(safe-area-inset-bottom, 0px));
    }
}

/* ==========================================================================
   Dynamic NPCs & Dialogue System
   ========================================================================== */

/* Container for all dynamic objects in a room */
.dynamic-objects-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 10;
}

/* Ensure visual-pane has position relative for absolute children */
.visual-pane {
    position: relative;
}

/* Individual NPC container */
.dynamic-npc {
    position: absolute;
    z-index: 100;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dynamic-npc:hover {
    transform: translateX(-50%) scale(1.1);
}

/* NPC sprite/icon */
.npc-sprite {
    width: 60px;
    height: 60px;
    background-color: #4CAF50;
    border-radius: 50%;
    border: 3px solid #333;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: filter 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dynamic-npc:hover .npc-sprite {
    filter: brightness(1.2);
}

/* NPC name label */
.npc-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.dynamic-npc:hover .npc-name {
    background-color: rgba(0,0,0,0.9);
}

/* Dialogue availability indicator (exclamation point) */
.dialogue-indicator {
    position: absolute;
    top: -15px;
    right: -10px;
    width: 24px;
    height: 24px;
    background-color: #FFD700;
    color: #333;
    border-radius: 50%;
    display: none;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    animation: bounce 2s infinite;
    z-index: 1000;
    border: 2px solid #FFA500;
}

/* Bounce animation for exclamation point */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Interactive icon positioning for dialogue indicators */
.interactive-icon {
    position: relative;
    display: inline-block;
}

/* Adjust dialogue indicator for icons in interactive-icon-pane */
.interactive-icon .dialogue-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background-color: #FFD700;
    color: #333;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    animation: bounce 2s infinite;
    z-index: 1000;
    border: 2px solid #FFA500;
}

/* ==========================================================================
   Dialogue UI System
   ========================================================================== */

.dialogue-ui-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-25%);
    width: 90%;
    max-width: 600px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--selective-yellow);
    border-radius: 8px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dialogue-ui-container.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-5%);
    pointer-events: none;
}

.dialogue-ui-container.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-25%);
    pointer-events: all;
}

.dialogue-ui-header {
    color: var(--selective-yellow);
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.dialogue-ui-response {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 1em;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}

.dialogue-ui-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialogue-option-button {
    background: rgba(255, 186, 8, 0.1);
    border: 1px solid var(--selective-yellow);
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dialogue-option-button:hover {
    background: rgba(255, 186, 8, 0.2);
    border-color: #ffd766;
    transform: translateX(5px);
}

.dialogue-option-button:active {
    transform: translateX(5px) scale(0.98);
}

.dialogue-option-key {
    display: inline-block;
    background: var(--selective-yellow);
    color: #000;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.dialogue-option-text {
    color: #fff;
}

/* Keyboard navigation highlight */
.dialogue-option-button:focus {
    outline: 2px solid var(--selective-yellow);
    outline-offset: 2px;
}

/* Disabled state for processing */
.dialogue-option-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dialogue input field for free-form questions */
.dialogue-input-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 186, 8, 0.3);
}

.dialogue-text-input {
    flex: 1;
    background: rgba(255, 186, 8, 0.05);
    border: 1px solid var(--selective-yellow);
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
}

.dialogue-text-input:focus {
    outline: none;
    background: rgba(255, 186, 8, 0.1);
    border-color: #ffd766;
    box-shadow: 0 0 0 2px rgba(255, 186, 8, 0.2);
}

.dialogue-text-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dialogue-submit-button {
    background: var(--selective-yellow);
    border: none;
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
}

.dialogue-submit-button:hover {
    background: #ffd766;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .dialogue-ui-container {
        width: 95%;
        bottom: 10px;
        padding: 15px;
    }
    
    .dialogue-option-button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .dialogue-input-container {
        flex-direction: column;
    }
    
    .dialogue-submit-button {
        width: 100%;
    }
}

/* Dialogue close button styling */
.dialogue-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dialogue-close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.dialogue-close-button:active {
    transform: scale(0.95);
}

/* Music player close button styling */
.music-player-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.music-player-close-button:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}
