/* ==========================================================================
   ACROFLIP - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Space Dark Mode, Glassmorphism, Neon Glow & Micro-Animations
   ========================================================================== */

:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(18, 20, 32, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #06b6d4; /* Neon Cyan */
    --secondary-glow: rgba(6, 182, 212, 0.3);
    --accent: #d946ef; /* Magenta */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-blur: blur(20px);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-header: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 11, 16, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Ambient Background Orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
    animation: pulseOrbs 15s ease-in-out infinite alternate;
}

.orb-1 {
    top: -10%;
    left: 10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.orb-2 {
    bottom: -10%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes pulseOrbs {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 11, 16, 0.5);
    backdrop-filter: var(--glass-blur);
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.logo-area:hover {
    transform: scale(1.03);
}

.logo-icon {
    width: 2.2rem;
    height: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Main Workspace */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 5%;
    position: relative;
}

/* Sections Transition */
.dashboard-section, .viewer-section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.dashboard-section.active, .viewer-section.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Hero Header */
.hero-header {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-family: var(--font-header);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header-icon {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--secondary);
}

.card-header h2 {
    font-family: var(--font-header);
    font-size: 1.4rem;
    font-weight: 600;
}

/* Drag and Drop Zone */
.drag-drop-zone {
    flex: 1;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-smooth);
    position: relative;
    min-height: 350px;
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.04);
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.1);
}

.drag-drop-zone:hover .upload-icon, .drag-drop-zone.dragover .upload-icon {
    color: var(--secondary);
    transform: translateY(-8px);
}

.upload-icon-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.drag-drop-zone:hover .upload-icon-container {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.upload-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.dropzone-content h3 {
    font-family: var(--font-header);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dropzone-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.file-size-limit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

/* Projects Section */
.projects-list-container {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 0.5rem;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    transition: var(--transition-smooth);
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.project-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-icon-container {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-item.sample-project .project-icon-container {
    background: rgba(217, 70, 239, 0.1);
    border-color: rgba(217, 70, 239, 0.2);
}

.project-item.sample-project .project-icon {
    color: var(--accent);
}

.project-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.project-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.project-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-meta span {
    margin-right: 0.8rem;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-danger-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    padding: 0;
}

/* Spinner & Loading */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner-small {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* FLIPBOOK VIEWER SECTION */
.viewer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.glass-panel {
    background: rgba(18, 20, 32, 0.5);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 18px;
}

.viewer-book-title {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 700;
}

/* Flipbook Container Layout */
.flipbook-frame {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    background: rgba(5, 5, 8, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.book-viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

.flipbook-container {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    background-color: #121420;
    transition: transform 0.3s ease;
}

/* ST.PAGEFLIP COMPONENT SPECIFICS */
.page {
    background-color: #111219;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.page-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.page-content img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

/* Cover & Hard pages */
.page[data-density="hard"] {
    background-color: #1e1f2b;
}

/* Shadow at the book fold */
.page-content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 5;
}

/* Left page shadow (fade from right to left) */
.page-content.left-page::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
}

/* Right page shadow (fade from left to right) */
.page-content.right-page::after {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
}

/* MULTIMEDIA OVERLAY LAYOUT */
.media-container {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Premium Video Overlays */
.media-container.video-container {
    border: 1px solid rgba(6, 182, 212, 0.3);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
    transition: var(--transition-smooth);
}

.media-container.video-container:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.3);
}

.media-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background-color: #000;
}

/* Custom Audio Players (Sound annotation widgets) */
.media-container.audio-container {
    border: 1px solid rgba(219, 70, 239, 0.3);
    background: rgba(18, 12, 30, 0.7);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 0 25px rgba(219, 70, 239, 0.15);
    border-radius: 16px;
    padding: 1rem;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audio-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.audio-wave-anim {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    padding-bottom: 2px;
}

.audio-wave-bar {
    width: 3px;
    height: 5px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.audio-container.playing .audio-wave-bar {
    animation: bounceWave 1.2s ease-in-out infinite alternate;
}

.audio-container.playing .audio-wave-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-container.playing .audio-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-container.playing .audio-wave-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-container.playing .audio-wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes bounceWave {
    0% { height: 5px; }
    100% { height: 28px; }
}

.audio-btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(219, 70, 239, 0.4);
    background: rgba(219, 70, 239, 0.15);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.audio-btn-play:hover {
    box-shadow: 0 0 15px rgba(219, 70, 239, 0.4);
    transform: scale(1.08);
}

.audio-info {
    flex: 1;
}

.audio-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.audio-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Audio fallback element hidden natively */
.audio-container audio {
    display: none;
}

/* INTERACTIVE FORM FIELDS (ACROFORMS OVERLAY) */
.widget-container {
    position: absolute;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Checkbox styles */
.form-checkbox-overlay {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(6, 182, 212, 0.4); /* Neon cyan border */
    border-radius: 6px;
    background: rgba(10, 11, 16, 0.3);
    backdrop-filter: blur(2px);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 8px rgba(6, 182, 212, 0.05);
}

.form-checkbox-overlay:hover {
    border-color: var(--secondary); /* Cyan glow */
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3), inset 0 0 12px rgba(6, 182, 212, 0.1);
    transform: scale(1.05);
}

.form-checkbox-overlay:focus {
    outline: none;
    border-color: var(--accent); /* Focus pink glow */
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.4);
}

.form-checkbox-overlay:checked {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

/* Custom checkmark check draw */
.form-checkbox-overlay::after {
    content: '';
    width: 32%;
    height: 60%;
    border: solid #ffffff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: -10%;
}

.form-checkbox-overlay:checked::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

/* Custom Text inputs & Textareas styles */
.form-text-overlay {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(18, 20, 32, 0.45);
    backdrop-filter: blur(3px);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 8px 12px;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Since text fields can sometimes be small, scale font appropriately */
@media (max-width: 768px) {
    .form-text-overlay {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
}

.form-text-overlay:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(18, 20, 32, 0.6);
}

.form-text-overlay:focus {
    border-color: var(--secondary); /* Cyan focus border */
    background: rgba(10, 11, 16, 0.7);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.form-text-overlay::placeholder {
    color: rgba(255, 255, 255, 0.15);
    font-style: italic;
}

/* Bottom Controller Bar */
.viewer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    gap: 2rem;
}

.control-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.page-indicator-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.page-slider-track {
    width: 100%;
    max-width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.page-slider-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* PROCESSING OVERLAY LOADER */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-overlay.active {
    display: flex;
    opacity: 1;
}

.loader-card {
    width: 100%;
    max-width: 580px;
    text-align: center;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.loader-spinner-container {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(6, 182, 212, 0.05);
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    position: absolute;
    animation: spin 1.5s linear infinite;
}

.loader-core {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(99, 102, 241, 0.05);
    border-bottom: 4px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    animation: spin 1s linear infinite reverse;
}

.loader-icon-pulsing {
    color: var(--secondary);
    width: 1.8rem;
    height: 1.8rem;
    animation: pulseIcon 1.5s ease-in-out infinite alternate;
}

@keyframes pulseIcon {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px var(--secondary-glow)); }
}

.loader-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Terminal Console View inside Loader */
.terminal-console {
    background: #06070a;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    text-align: left;
    font-family: monospace;
    font-size: 0.8rem;
    margin-top: 1rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #f59e0b; }
.terminal-dot.green { background-color: #10b981; }

.terminal-title {
    margin-left: 0.5rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
}

.terminal-body {
    padding: 1rem;
    height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.log-line {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.log-line.text-blue { color: var(--secondary); }
.log-line.text-green { color: #10b981; }
.log-line.text-yellow { color: #f59e0b; }
.log-line.text-red { color: #ef4444; }

/* Acrobat Interactive Buttons, Popups & Hover Triggers styling */
.button-widget-container {
    position: absolute;
    z-index: 10;
}

/* Premium popup image styling with elegant fade/scale entrance and crisp rendering */
.button-popup-image {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 15;
}

.button-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Invisible button trigger with responsive hover highlighting */
.button-trigger {
    cursor: pointer;
    background: rgba(0, 0, 0, 0); /* Forces mouse capture on empty absolute container divs */
    border: 1px dashed transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    pointer-events: auto; /* Explicitly enable pointer capture */
}

.button-trigger:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background-color: rgba(6, 182, 212, 0.05);
}

/* ==========================================================================
   6. PREMIUM INVISIBLE / COVER-ONLY AUDIO HOTSPOT STYLING
   ========================================================================== */

/* Invisible / Cover-only audio hotspot player */
.media-container.audio-container.audio-hotspot-mode {
    background-color: rgba(0, 0, 0, 0) !important; /* Forces mouse click capture on empty absolute container divs */
    border: 2px dashed transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    max-width: none !important;
    pointer-events: auto !important; /* Explicitly guarantee pointer capture */
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Subtle hover indicator so users know it is a clickable hot-zone */
.media-container.audio-container.audio-hotspot-mode:hover {
    border-color: rgba(219, 70, 239, 0.35) !important;
    background-color: rgba(219, 70, 239, 0.03) !important;
    box-shadow: 0 0 20px rgba(219, 70, 239, 0.1) !important;
    transform: scale(1.01);
}

/* When playing, show a gorgeous, premium soft pulsing breathing aura so they know it is active */
.media-container.audio-container.audio-hotspot-mode.playing {
    border-color: rgba(219, 70, 239, 0.5) !important;
    background-color: rgba(219, 70, 239, 0.02) !important;
    animation: audioHotspotPulse 2.5s infinite ease-in-out;
}

@keyframes audioHotspotPulse {
    0% {
        box-shadow: 0 0 15px rgba(219, 70, 239, 0.1);
        border-color: rgba(219, 70, 239, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(219, 70, 239, 0.35), inset 0 0 15px rgba(219, 70, 239, 0.05);
        border-color: rgba(219, 70, 239, 0.6);
    }
    100% {
        box-shadow: 0 0 15px rgba(219, 70, 239, 0.1);
        border-color: rgba(219, 70, 239, 0.3);
    }
}

/* Completely hide the visual player widget inside hotspot modes */
.media-container.audio-container.audio-hotspot-mode .audio-widget {
    display: none !important;
}
