/* Detective Conan SQL Game - Manga/Comic Book Theme */

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Fredoka+One&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    /* Manga/Comic Book Color Palette */
    --paper: #fffef7;
    --paper-yellow: #fff9e6;
    --paper-shadow: #e8e5d3;
    --manga-red: #e63946;
    --manga-blue: #1d3557;
    --manga-dark-blue: #0d1b2a;
    --manga-yellow: #ffd60a;
    --manga-orange: #ff6b35;
    --manga-green: #06a77d;
    --manga-purple: #7209b7;
    --border-comic: #1a1a1a;
    --border-thick: 3px solid var(--border-comic);
    --border-medium: 2px solid var(--border-comic);
    --border-thin: 1px solid var(--border-comic);
    --shadow-comic: 4px 4px 0 rgba(0, 0, 0, 0.2), 8px 8px 0 rgba(0, 0, 0, 0.1);
    --shadow-panel: 0 0 0 3px var(--border-comic), 4px 4px 0 rgba(0, 0, 0, 0.15);
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #ffffff;
    --bg-primary: var(--paper);
    --bg-secondary: var(--paper-yellow);
    --bg-panel: #ffffff;
    --accent-red: var(--manga-red);
    --accent-blue: var(--manga-blue);
    --accent-yellow: var(--manga-yellow);
}

body {
    font-family: 'Noto Sans JP', 'Comic Neue', 'Comic Sans MS', sans-serif;
    background: linear-gradient(135deg, #f5f3e7 0%, #e8e5d3 50%, #d4cfb8 100%);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
        linear-gradient(135deg, #f5f3e7 0%, #e8e5d3 50%, #d4cfb8 100%);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 20px;
    line-height: 1.6;
}

/* Landing Page */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f3e7 0%, #e8e5d3 50%, #d4cfb8 100%);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
        linear-gradient(135deg, #f5f3e7 0%, #e8e5d3 50%, #d4cfb8 100%);
    z-index: 10000;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
}

.landing-content {
    max-width: 900px;
    width: 100%;
    background: var(--paper);
    border: var(--border-thick);
    box-shadow: var(--shadow-comic);
    padding: 30px 25px;
    text-align: center;
    margin: 20px auto;
}

/* When landing-content has comic-spread class, override default styles */
.landing-content.comic-spread {
    max-width: none;
    width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: left;
    margin: 0;
}

.landing-logo {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detective-conan-logo {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.landing-title {
    font-family: 'Roboto Slab', serif;
    font-size: 28px !important;
    font-weight: 700;
    color: var(--manga-blue);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.landing-text {
    text-align: left;
}

.landing-story {
    background: var(--paper-yellow);
    border: var(--border-medium);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 6px solid var(--manga-blue);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.story-intro {
    font-size: 18px !important;
    font-weight: 700;
    color: var(--manga-red);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.landing-story p {
    font-size: 18px !important;
    line-height: 1.8 !important;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.landing-story strong {
    color: var(--manga-blue);
    font-weight: 700;
}

.landing-goals,
.landing-instructions {
    background: var(--paper);
    border: var(--border-medium);
    padding: 18px;
    margin-bottom: 20px;
    border-left: 6px solid var(--manga-green);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.goals-title,
.instructions-title {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--manga-green);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.goals-list,
.instructions-list {
    list-style: none;
    padding-left: 0;
}

.goals-list li,
.instructions-list li {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    color: var(--text-dark);
}

.goals-list li::before {
    content: "🔍";
    position: absolute;
    left: 0;
    font-size: 20px;
}

.instructions-list {
    counter-reset: step-counter;
}

.instructions-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--manga-blue);
    background: var(--paper-yellow);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--manga-blue);
    border-radius: 50%;
    font-size: 14px;
}

.instructions-list li strong {
    color: var(--manga-blue);
    font-weight: 700;
}

.landing-start-btn {
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 15px 40px !important;
    font-size: 20px !important;
    background: var(--manga-red) !important;
    color: var(--text-light) !important;
    border: var(--border-thick) !important;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.landing-start-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3) !important;
    background: #c62828 !important;
}

.landing-start-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Improve readability - larger base sizes for manga comic style */
.case-file .file-content p {
    font-size: 18px !important;
    line-height: 1.7 !important;
    font-weight: 400;
}

.table-item h3 {
    font-size: 20px !important;
    font-weight: 700;
}

.table-item p {
    font-size: 18px !important;
    line-height: 1.6;
}

.results-table {
    font-size: 16px !important;
}

.results-table th {
    font-size: 16px !important;
    padding: 12px !important;
    font-weight: 700;
}

.results-table td {
    font-size: 16px !important;
    padding: 12px !important;
}

/* Detective Office Container */
.detective-office {
    width: 100%;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    overflow-x: hidden;
    box-sizing: border-box;
}

.detective-office * {
    max-width: 100%;
}

/* Office Background */
.office-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b7355 0%, #6b5d4f 50%, #4a3d2f 100%);
    z-index: -1;
    opacity: 0.3;
}

/* Detective Character */
.detective-character-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 120px;
    height: auto;
}

.detective-character-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.3));
}

/* Desk Surface - Main Grid Layout */
.desk-surface {
    display: grid;
    grid-template-columns: 35% 65%;
    grid-template-rows: 1fr;
    gap: 20px;
    min-height: calc(100vh - 40px);
    position: relative;
    z-index: 1;
}

/* Case File Section */
.case-file-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100%;
}

/* Case File - Realistic Manila Folder with Paper Files */
.case-file {
    background: 
        /* Paper files inside showing edges */
        linear-gradient(90deg, 
            transparent 0%,
            transparent 15%,
            rgba(255,255,255,0.1) 15%,
            rgba(255,255,255,0.1) 16%,
            transparent 16%,
            transparent 20%,
            rgba(255,255,255,0.08) 20%,
            rgba(255,255,255,0.08) 21%,
            transparent 21%
        ),
        /* Manila folder texture */
        repeating-linear-gradient(
            0deg,
            #f4e4bc 0px,
            #f4e4bc 1px,
            #f0dfb3 1px,
            #f0dfb3 2px
        ),
        linear-gradient(135deg, #f4e4bc 0%, #e8d5a3 30%, #dcc99a 60%, #e8d5a3 100%);
    background-color: #f4e4bc;
    border: 5px solid #8b7355;
    border-top: 18px solid #d2691e;
    box-shadow: 
        0 0 0 3px rgba(139,115,85,0.3),
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.2),
        inset 0 4px 8px rgba(255,255,255,0.5),
        inset 0 -4px 8px rgba(0,0,0,0.2),
        inset 20px 0 0 rgba(255,255,255,0.1),
        inset -20px 0 0 rgba(0,0,0,0.05);
    padding: 35px 30px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    transform: perspective(1000px) rotateX(1deg) rotateY(-0.5deg);
}

/* Manila folder tab */
.case-file::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 30px;
    width: 100px;
    height: 18px;
    background: linear-gradient(135deg, #d2691e 0%, #cd853f 50%, #d2691e 100%);
    border: 4px solid #8b4513;
    border-bottom: none;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 15px 100%);
    z-index: 3;
    box-shadow: 
        0 -2px 4px rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.3);
}

/* Paper file edges visible inside folder */
.case-file::after {
    content: '';
    position: absolute;
    top: 25px;
    right: 15px;
    width: 8px;
    height: calc(100% - 50px);
    background: linear-gradient(90deg,
        rgba(255,255,255,0.6) 0%,
        rgba(255,255,255,0.4) 50%,
        rgba(255,255,255,0.6) 100%
    );
    box-shadow: 
        -2px 0 4px rgba(0,0,0,0.1),
        inset -1px 0 2px rgba(0,0,0,0.05);
    z-index: 1;
    pointer-events: none;
}

/* Additional paper file edges */
.case-file .file-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 25px;
    width: 6px;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.5) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.5) 100%
    );
    box-shadow: -1px 0 3px rgba(0,0,0,0.08);
    z-index: 1;
    pointer-events: none;
}

/* Removed hover and active states - case file is no longer clickable */

.file-header {
    border-bottom: 4px solid var(--border-comic);
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.05) 2px,
            rgba(0,0,0,0.05) 4px
        );
    padding-top: 5px;
    margin-top: -5px;
}

.file-tab {
    position: absolute;
    top: -12px;
    left: 25px;
    width: 50px;
    height: 12px;
    background: var(--manga-red);
    border: 3px solid var(--border-comic);
    border-bottom: none;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.file-header h1.comic-text {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 14px !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--manga-blue);
    text-shadow: 
        2px 2px 0 rgba(255,255,255,0.8),
        3px 3px 0 rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

.file-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 2;
    background: 
        /* Paper texture */
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.03) 0px,
            rgba(255,255,255,0.03) 1px,
            transparent 1px,
            transparent 2px
        ),
        /* Paper color */
        linear-gradient(135deg, 
            rgba(255,255,255,0.1) 0%,
            transparent 50%,
            rgba(255,255,255,0.05) 100%
        );
    padding: 15px;
    margin: -5px;
    border-radius: 2px;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.05),
        0 1px 3px rgba(0,0,0,0.1);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.file-content p,
.file-content div {
    max-width: 95%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    box-sizing: border-box;
}

.case-task,
.case-progress {
    border-top: 2px solid rgba(139,115,85,0.3);
    padding-top: 20px;
    margin-top: 18px;
    background: 
        /* Lined paper effect */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(139,115,85,0.1) 24px,
            rgba(139,115,85,0.1) 25px
        ),
        /* Paper background */
        rgba(255,255,255,0.2);
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    position: relative;
}

.case-task::before,
.case-progress::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    width: 3px;
    height: calc(100% - 20px);
    background: linear-gradient(180deg, 
        rgba(139,115,85,0.4) 0%,
        transparent 100%
    );
}

.zoom-hint {
    margin-top: auto;
    padding-top: 15px;
    text-align: center;
    color: var(--text-medium);
    font-style: italic;
}

/* Query Builder Launcher */
.query-builder-launcher {
    flex: 0 0 auto;
}

/* Evidence Board Panel */
.evidence-board-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.board-view {
    display: none;
    flex-direction: column;
    min-height: 100%;
}

.board-view.active {
    display: flex;
}

.board-label {
    background: var(--manga-blue);
    color: var(--text-light);
    padding: 10px 15px;
    border: var(--border-medium);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.board-label:hover {
    background: var(--manga-dark-blue);
}

.evidence-board-frame,
.query-builder-frame {
    background: var(--paper);
    border: 2px solid var(--border-comic);
    box-shadow: 0 0 0 2px var(--border-comic), 2px 2px 0 rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.board-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

/* Evidence Pinboard */
.evidence-pinboard {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
    align-content: start;
    position: relative;
    padding: 20px;
    background: #d4a574;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(0,0,0,0.15) 1px, transparent 0),
        linear-gradient(135deg, #d4a574 0%, #c49a6a 100%);
    background-size: 40px 40px, 100% 100%;
    border: var(--border-thick);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.2);
    overflow: auto;
    min-height: 400px;
}

.pinboard-card {
    position: relative;
    background: var(--paper);
    border: var(--border-medium);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
    padding: 15px;
    cursor: pointer;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 auto;
    width: 280px;
    min-height: 150px;
    transform: rotate(var(--rotation, 0deg));
}

.pinboard-card:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.pinboard-card .pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #8b4513;
    border: 2px solid #654321;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pinboard-card-title {
    font-weight: 700;
    font-size: 16px !important;
    margin-bottom: 10px;
    color: var(--manga-blue);
    text-transform: uppercase;
}

.pinboard-card-query {
    font-family: 'Courier New', monospace;
    font-size: 12px !important;
    background: var(--paper-yellow);
    padding: 8px;
    border: var(--border-thin);
    margin-bottom: 10px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 60px;
}

.pinboard-card-rows {
    font-size: 14px !important;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.pinboard-card-button {
    background: var(--manga-blue);
    color: var(--text-light);
    border: var(--border-thin);
    padding: 8px 12px;
    font-size: 12px !important;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.pinboard-card-button:hover {
    background: var(--manga-dark-blue);
}

/* Evidence Board fullscreen modal – tighter, more readable sizing */
#evidence-modal .evidence-pinboard {
    padding: 24px;
    gap: 24px;
}

/* Override inline styles from JS - use !important to override inline fontSize */
#evidence-modal .pinboard-card h4,
#evidence-modal .pinboard-card .pixel-text-tiny {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

#evidence-modal .pinboard-card p {
    font-size: 11px !important;
    line-height: 1.4 !important;
}

#evidence-modal .pinboard-card button,
#evidence-modal .pinboard-card .btn-pixel {
    font-size: 11px !important;
    padding: 6px 10px !important;
}

/* Specifically target the query preview text */
#evidence-modal .pinboard-card p[style*="fontSize"] {
    font-size: 11px !important;
    max-height: 80px !important;
    overflow: hidden !important;
}

/* Target row count */
#evidence-modal .pinboard-card p[style*="fontSize"]:not([style*="Courier"]) {
    font-size: 11px !important;
}

.pinboard-placeholder {
    text-align: center;
    color: var(--text-medium);
    padding: 40px 20px;
    font-style: italic;
}

/* Query Builder Body */
.query-builder-body {
    display: grid !important;
    grid-template-columns: 30% 70% !important;
    grid-template-rows: 1fr !important;
    gap: 20px;
    min-height: 100%;
    flex: 1 1 auto;
}

/* Database Files - Filing Cabinet Style */
.database-files {
    display: flex;
    flex-direction: column;
    background: 
        /* Filing cabinet texture */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.03) 2px,
            rgba(0,0,0,0.03) 4px
        ),
        /* Metal filing cabinet color */
        linear-gradient(135deg, #8b7355 0%, #6b5d4f 50%, #5a4d3f 100%);
    background-color: #6b5d4f;
    border: 5px solid #4a3d2f;
    padding: 15px;
    overflow-y: auto;
    min-height: 0;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.1),
        0 4px 8px rgba(0,0,0,0.4),
        0 8px 16px rgba(0,0,0,0.2);
    position: relative;
}

.database-files::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, 
        rgba(139,115,85,0.8) 0%,
        rgba(74,61,47,0.6) 50%,
        rgba(90,77,63,0.8) 100%
    );
    border-bottom: 2px solid #4a3d2f;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.database-files::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(0deg, 
        rgba(74,61,47,0.8) 0%,
        rgba(90,77,63,0.6) 50%,
        rgba(139,115,85,0.8) 100%
    );
    border-top: 2px solid #4a3d2f;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 3px solid rgba(74,61,47,0.5);
    position: relative;
    z-index: 2;
}

.files-header h3 {
    color: #f4e4bc;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 
        2px 2px 0 rgba(0,0,0,0.5),
        0 0 10px rgba(0,0,0,0.3);
}

.table-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

/* Table Item - Manila Folder Style (Collapsible) */
.table-item {
    background: 
        /* Paper edges visible */
        linear-gradient(90deg, 
            transparent 0%,
            transparent 95%,
            rgba(255,255,255,0.3) 95%,
            rgba(255,255,255,0.4) 96%,
            rgba(255,255,255,0.3) 97%,
            transparent 97%
        ),
        /* Manila folder */
        repeating-linear-gradient(
            0deg,
            #f4e4bc 0px,
            #f4e4bc 1px,
            #f0dfb3 1px,
            #f0dfb3 2px
        ),
        linear-gradient(135deg, #f4e4bc 0%, #e8d5a3 50%, #dcc99a 100%);
    background-color: #f4e4bc;
    border: 4px solid #8b7355;
    border-top: 14px solid #d2691e;
    padding: 0;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 
        0 0 0 2px rgba(139,115,85,0.2),
        4px 4px 0 rgba(0, 0, 0, 0.2),
        8px 8px 0 rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255,255,255,0.4),
        inset 0 -2px 4px rgba(0,0,0,0.15);
    transform: perspective(600px) rotateX(1deg);
    overflow: hidden;
}

/* Folder tab */
.table-item::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 20px;
    width: 90px;
    height: 14px;
    background: linear-gradient(135deg, #d2691e 0%, #cd853f 50%, #d2691e 100%);
    border: 3px solid #8b4513;
    border-bottom: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%);
    z-index: 3;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.3);
}

/* Paper edges visible on right */
.table-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.5) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.5) 100%
    );
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    z-index: 1;
    pointer-events: none;
}

.table-item:hover {
    transform: perspective(600px) rotateX(0deg) translateY(-2px);
    box-shadow: 
        0 0 0 2px rgba(139,115,85,0.3),
        6px 6px 0 rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(255,255,255,0.4),
        inset 0 -2px 4px rgba(0,0,0,0.15);
    border-top-color: #ff8c00;
}

.table-item.expanded {
    padding-bottom: 10px;
}

.table-item h3 {
    font-size: 18px !important;
    font-weight: 900;
    margin: 0;
    padding: 12px 15px 10px 20px;
    color: var(--manga-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
    position: relative;
    z-index: 2;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid rgba(139,115,85,0.3);
}

.table-item.expanded h3 {
    border-bottom: 2px solid rgba(139,115,85,0.5);
}

.table-item p {
    font-size: 14px !important;
    color: var(--text-dark);
    margin: 0;
    padding: 8px 15px 8px 20px;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

/* Column list - hidden by default, shown when expanded */
.table-item .column-list {
    display: none;
    padding: 0 15px 10px 20px;
    margin-top: 5px;
    position: relative;
    z-index: 2;
}

.table-item.expanded .column-list {
    display: block;
}

/* Column Item - Paper File Style */
.column-item {
    padding: 6px 10px;
    margin: 3px 0;
    background: 
        /* Paper texture */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        ),
        /* White paper */
        linear-gradient(135deg, #ffffff 0%, #fefefe 50%, #ffffff 100%);
    background-color: #ffffff;
    border: 2px solid #d4c5a9;
    border-left: 5px solid #8b7355;
    cursor: grab;
    font-size: 14px !important;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
    box-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    transform: perspective(400px) rotateY(-0.5deg);
    margin-left: 8px;
    margin-right: 4px;
}

/* Paper edge on right */
.column-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.6) 0%,
        rgba(212,197,169,0.4) 50%,
        rgba(255,255,255,0.6) 100%
    );
    box-shadow: -1px 0 2px rgba(0,0,0,0.05);
    pointer-events: none;
}

.column-item:hover {
    background: linear-gradient(135deg, #fffef7 0%, #ffffff 50%, #fffef7 100%);
    transform: perspective(400px) rotateY(0deg) translateX(4px) translateY(-1px);
    box-shadow: 
        2px 2px 0 rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.8);
    border-left-color: #a0522d;
    z-index: 10;
}

.column-item.dragging {
    opacity: 0.7;
    transform: perspective(400px) rotateY(2deg) rotateZ(1deg) scale(1.05);
    z-index: 100;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.column-item.star-item {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #fffacd 0%, #fffef0 50%, #fffacd 100%);
    font-weight: 900;
    font-size: 18px !important;
    border: 3px solid #ffd700;
}

.column-item.star-item:hover {
    background: linear-gradient(135deg, #fffef0 0%, #fffacd 50%, #fffef0 100%);
    border-left-color: #ff8c00;
    border-color: #ff8c00;
}

.star-drag {
    font-weight: 700;
    font-size: 18px !important;
    color: var(--manga-yellow);
    cursor: grab;
    padding: 5px 10px;
    border: var(--border-thin);
    background: var(--paper);
    display: inline-block;
    margin: 5px 0;
}

.star-drag:hover {
    background: var(--paper-yellow);
}

.star-drag:active {
    cursor: grabbing;
}

/* Computer Monitor - Comic Book Manga Style */
.computer-monitor {
    display: flex;
    flex-direction: column;
    background: 
        /* Paper texture */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        ),
        /* Comic book paper */
        linear-gradient(135deg, var(--paper) 0%, var(--paper-yellow) 50%, var(--paper) 100%);
    background-color: var(--paper);
    border: 5px solid var(--border-comic);
    border-left: 8px solid var(--manga-blue);
    padding: 25px;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 0 0 4px rgba(0,0,0,0.1),
        8px 8px 0 rgba(0, 0, 0, 0.3),
        16px 16px 0 rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255,255,255,0.5),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    clip-path: polygon(
        0 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% 100%,
        0 100%
    );
}

.computer-monitor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--manga-blue) 0px,
        var(--manga-blue) 15px,
        var(--manga-red) 15px,
        var(--manga-red) 30px
    );
    border-bottom: 3px solid var(--border-comic);
    z-index: 1;
}

.monitor-frame {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    background: var(--paper-yellow);
    border: 2px solid var(--border-comic);
    padding: 15px;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.03),
        1px 1px 0 rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.screen-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    background: var(--paper);
}

/* Query Tabs */
.query-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: var(--border-medium);
}

/* Query Builder Tabs */
.query-builder-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-comic);
    padding-bottom: 8px;
}

.tab-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--paper-yellow);
    border: 2px solid var(--border-comic);
    border-radius: 4px;
    color: var(--text-dark);
    font-family: var(--font-pixel);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.tab-btn:hover {
    background: var(--paper-yellow-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-btn-pixel {
    background: linear-gradient(135deg, var(--paper-yellow) 0%, #ffe8b3 100%);
    background-color: var(--paper-yellow);
    border: var(--border-thick);
    border-bottom: none;
    padding: 12px 24px;
    font-size: 14px !important;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    top: 2px;
    letter-spacing: 0.1em;
    box-shadow: 
        0 -2px 0 rgba(0,0,0,0.1),
        2px 2px 0 rgba(0, 0, 0, 0.15);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.tab-btn-pixel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.tab-btn-pixel:hover {
    background: linear-gradient(135deg, #ffe8b3 0%, var(--paper-yellow) 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 -2px 0 rgba(0,0,0,0.1),
        3px 3px 0 rgba(0, 0, 0, 0.2);
}

.tab-btn-pixel.active {
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-yellow) 100%);
    background-color: var(--paper);
    border-bottom: 3px solid var(--paper);
    z-index: 1;
    box-shadow: 
        0 -2px 0 rgba(0,0,0,0.1),
        4px 4px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    color: var(--manga-blue);
    font-weight: 900;
}

/* Raw SQL Editor */
.raw-sql-container {
    padding: 15px;
}

.raw-sql-editor {
    margin-bottom: 15px;
}

.raw-sql-textarea {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    background: var(--paper);
    border: 2px solid var(--border-comic);
    border-radius: 4px;
    color: var(--text-dark);
    resize: vertical;
}

.raw-sql-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.raw-sql-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.query-builder {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: none;
}

.query-builder.active {
    display: block;
}

/* Visual Builder Steps */
.visual-builder-steps {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    background: var(--paper-yellow);
    border: 2px solid var(--border-comic);
    padding: 25px;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.03),
        2px 2px 0 rgba(0, 0, 0, 0.15);
}

.visual-builder-step,
.builder-step {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.visual-builder-step.active,
.builder-step.active {
    display: flex;
    flex-direction: column;
}

.visual-builder-step h3,
.builder-step h3 {
    color: var(--manga-blue);
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--border-comic);
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.15);
    font-size: 20px !important;
}

.visual-builder-step .step-description,
.builder-step .step-description {
    color: var(--text-dark);
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    margin-bottom: 15px;
    font-size: 18px !important;
    line-height: 1.6;
}

/* Live SQL Preview - Cleaner Style */
.live-sql-preview {
    margin-top: 20px;
    padding: 15px;
    background: var(--paper-yellow);
    border: 2px solid var(--border-comic);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    max-width: 100%;
}

.live-sql-preview > div:first-child {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--manga-blue);
    text-transform: uppercase;
}

.live-sql-text {
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.step-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0,255,255,0.4);
}

.step-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: transparent;
    border: none;
    padding: 20px;
    box-shadow: none;
    position: relative;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: var(--border-medium);
}

/* Selected Columns - Comic Book Style */
.selected-columns {
    background: var(--paper);
    border: 2px solid var(--border-comic);
    padding: 15px;
    margin-top: 15px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.03),
        1px 1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 4px;
}

.selected-columns legend {
    color: var(--manga-blue);
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    font-size: 18px !important;
}

.selected-columns h4 {
    font-size: 16px !important;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--manga-blue);
}

.selected-column-item {
    background: var(--paper-yellow);
    border: 1px solid rgba(26, 26, 26, 0.2);
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.selected-column-item span {
    font-size: 16px !important;
    color: var(--text-dark);
    font-weight: 500;
}

.selected-column-item button {
    background: var(--manga-red);
    color: var(--text-light);
    border: var(--border-thin);
    padding: 5px 10px;
    font-size: 14px !important;
    cursor: pointer;
    font-weight: 700;
}

.selected-column-item button:hover {
    background: #c62828;
}

/* Conditions */
.conditions-container {
    background: var(--paper);
    border: var(--border-medium);
    padding: 20px;
    margin-top: 15px;
}

.conditions-container h4 {
    font-size: 18px !important;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--manga-blue);
}

.condition-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: var(--paper);
    border: 1px solid rgba(26, 26, 26, 0.3);
    margin-bottom: 12px;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}

.condition-item > * {
    max-width: 100%;
    box-sizing: border-box;
}

.condition-connector {
    padding: 12px;
    border: 1px solid var(--manga-blue);
    background: var(--manga-blue);
    color: var(--text-light);
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 16px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.condition-item select,
.condition-item input {
    padding: 10px;
    border: 1px solid rgba(26, 26, 26, 0.3);
    font-size: 16px !important;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    min-width: 150px;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.condition-item select {
    cursor: pointer;
    background: var(--paper);
}

/* Keep AND/OR connector readable (blue pill with white text) */
.condition-item select.condition-connector {
    background: var(--manga-blue);
    color: var(--text-light);
}

.condition-remove-btn {
    background: var(--manga-red);
    color: var(--text-light);
    border: 1px solid var(--manga-red);
    padding: 10px 15px;
    font-size: 16px !important;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.condition-remove-btn:hover {
    background: #c62828;
}

.add-condition-btn {
    background: var(--manga-green);
    color: var(--text-light);
    border: var(--border-thick);
    padding: 12px 20px;
    font-size: 16px !important;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 10px;
}

.add-condition-btn:hover {
    background: #059669;
}

/* SQL Editor */
.sql-editor-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: var(--border-medium);
    background: #1e1e1e;
}

#sql-editor {
    flex: 1 1 auto;
    min-height: 400px;
}

/* Execute Button */
.execute-query-btn {
    background: var(--manga-green);
    color: var(--text-light);
    border: var(--border-thick);
    padding: 15px 30px;
    font-size: 18px !important;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.execute-query-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    background: #059669;
}

.execute-query-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

/* Results Container */
.results-container {
    margin-top: 20px;
    background: var(--paper);
    border: var(--border-medium);
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.results-placeholder {
    text-align: center;
    color: var(--text-medium);
    padding: 40px 20px;
    font-style: italic;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent body scroll when modals are open */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}


/* Additional scrollbar prevention for case image modal */
#case-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.modal-content {
    background: var(--paper);
    border: var(--border-thick);
    box-shadow: var(--shadow-comic);
    padding: 30px;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.fullscreen-modal {
    width: 98vw !important;
    min-height: 98vh !important;
    max-width: 98vw !important;
    padding: 20px;
    overflow-y: auto;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.modal .close:hover {
    color: var(--manga-red);
}

/* Case Image Modal Styles - Manga Comic Book Style */
#case-image-modal {
    background: rgba(0, 0, 0, 0.8);
    overflow: hidden; /* Prevent scrollbars from flashing */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.case-image-modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.comic-panel {
    position: relative;
    width: auto;
    max-width: min(850px, 90vw);
    max-height: 90vh;
    margin: 0 auto;
    animation: comicPanelAppear 0.6s ease-out;
    overflow: hidden; /* Ensure panel content doesn't overflow */
    box-sizing: border-box;
}

@keyframes comicPanelAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-2deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.panel-border {
    position: relative;
    background: var(--paper);
    border: 4px solid #000;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 6px #000,
        8px 8px 0 rgba(0,0,0,0.5),
        inset 0 0 20px rgba(0,0,0,0.1);
    padding: 20px;
    border-radius: 0;
    overflow: hidden;
}

/* Comic book corner decorations */
.corner-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--paper);
    border: 2px solid #000;
}

.corner-decoration.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.corner-decoration.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.corner-decoration.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.corner-decoration.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Close button */
.comic-close-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: #ff6b6b;
    border: 3px solid #000;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.2s ease;
}

.comic-close-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.close-x {
    line-height: 1;
    font-size: 20px;
    font-weight: 900;
}

/* Panel header */
.panel-header {
    background: linear-gradient(135deg, #1d3557 0%, #2d5aa0 100%);
    border: 2px solid #000;
    margin: -20px -20px 15px -20px;
    padding: 12px 20px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.comic-title {
    color: #fff !important;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    font-weight: 900 !important;
    letter-spacing: 2px;
    margin: 0 !important;
    text-transform: uppercase;
}

/* Panel content */
.panel-content {
    text-align: center;
    margin-bottom: 20px;
}

.case-image {
    max-width: 100%;
    max-height: min(60vh, 500px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid #000;
    box-shadow:
        3px 3px 0 rgba(0,0,0,0.3),
        inset 0 0 10px rgba(0,0,0,0.1);
    background: #f8f9fa;
    display: block; /* Prevent inline spacing issues */
}

/* Panel footer */
.panel-footer {
    text-align: center;
    border-top: 2px solid #000;
    margin: 15px -20px -20px -20px;
    padding: 15px 20px 20px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.comic-action-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff !important;
    border: 3px solid #000 !important;
    padding: 12px 24px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow:
        3px 3px 0 rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.comic-action-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow:
        5px 5px 0 rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.comic-action-btn:active {
    transform: translate(1px, 1px);
    box-shadow:
        1px 1px 0 rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .case-image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .panel-border {
        padding: 15px;
    }

    .panel-header {
        margin: -15px -15px 12px -15px;
        padding: 10px 15px;
    }

    .comic-title {
        font-size: 14px !important;
        letter-spacing: 1px;
    }

    .case-image {
        max-height: 50vh;
    }

    .panel-footer {
        margin: 12px -15px -15px -15px;
        padding: 12px 15px 15px 15px;
    }

    .comic-action-btn {
        padding: 10px 20px !important;
        min-width: 180px;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .comic-panel {
        max-width: 98vw;
    }

    .panel-border {
        padding: 10px;
    }

    .panel-header {
        margin: -10px -10px 10px -10px;
        padding: 8px 10px;
    }

    .comic-title {
        font-size: 12px !important;
    }

    .case-image {
        max-height: 40vh;
    }

    .panel-footer {
        margin: 10px -10px -10px -10px;
        padding: 10px;
    }

    .comic-action-btn {
        padding: 8px 16px !important;
        min-width: 160px;
        font-size: 11px !important;
    }

    .comic-close-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .close-x {
        font-size: 16px;
    }
}

/* Comic book action lines background */
#case-image-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: actionLines 2s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes actionLines {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

/* Comic book "impact" text effect */
.comic-panel::before {
    content: 'BAM!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    font-size: 24px;
    font-weight: 900;
    color: #ff6b6b;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive;
    opacity: 0;
    animation: bamEffect 0.8s ease-out forwards;
    z-index: 5;
    pointer-events: none;
}

@keyframes bamEffect {
    0% {
        opacity: 0;
        transform: translateX(-50%) rotate(-15deg) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) rotate(-15deg) scale(1.2);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) rotate(-10deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) rotate(-5deg) scale(0.8);
    }
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: var(--border-medium);
}

.modal-body {
    overflow-y: auto;
}

.pixel-panel {
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-yellow) 100%);
    background-color: var(--paper);
    border: var(--border-thick);
    box-shadow: 
        0 0 0 3px rgba(0,0,0,0.1),
        6px 6px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.5);
    position: relative;
}

.pixel-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
    pointer-events: none;
    opacity: 0.5;
}

/* Query Detail Modal - Professional Redesign */
#query-detail-modal .modal-content {
    width: 95vw !important;
    height: 95vh !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#query-detail-modal .modal-header {
    flex-shrink: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--manga-blue);
}

#query-detail-modal #query-detail-title {
    font-size: 24px !important;
    line-height: 1.3;
    margin: 0;
    color: var(--manga-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#query-detail-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.query-detail-info {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--border-comic);
    border-left: 5px solid var(--manga-blue);
    border-radius: 8px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

#query-detail-modal .query-detail-task {
    font-size: 16px !important;
    font-weight: 700;
    margin: 0;
    color: var(--manga-blue);
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#query-detail-modal .query-detail-sql {
    font-family: 'Courier New', monospace;
    font-size: 13px !important;
    background: var(--paper-yellow);
    padding: 1rem;
    border: 2px solid var(--border-comic);
    border-radius: 6px;
    word-break: break-word;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#query-detail-modal .query-detail-sql pre {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#query-detail-modal .query-detail-results {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--paper);
    border: 2px solid var(--border-comic);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#query-detail-modal .query-detail-results .results-table {
    font-size: 13px !important;
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

#query-detail-modal .query-detail-results .results-table th {
    font-size: 13px !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.4;
    background: var(--manga-blue);
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border: 2px solid var(--border-comic);
    position: sticky;
    top: 0;
    z-index: 10;
}

#query-detail-modal .query-detail-results .results-table td {
    font-size: 13px !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--paper);
    word-break: break-word;
    max-width: 300px;
}

#query-detail-modal .query-detail-results .results-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.7);
}

#query-detail-modal .query-detail-results .results-table tr:hover td {
    background: var(--paper-yellow);
}

#query-detail-modal .query-detail-results p {
    font-size: 14px !important;
    color: var(--text-medium);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* Case Section Text Sizes */
#case-title,
#case-title-full,
.case-section h3 {
    font-size: 16px !important;
    line-height: 1.4 !important;
}

#case-story,
#case-story-full,
#case-task-text,
#case-task-full,
.case-section p,
.case-progress p {
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* Text Classes */
.comic-text {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
}

.comic-text-medium {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 18px !important;
    font-weight: 700;
}

.comic-text-small {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 16px !important;
}

.comic-text-tiny {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 14px !important;
}

.pixel-text {
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.pixel-text-large {
    font-family: 'Courier New', monospace;
    font-size: 24px !important;
    font-weight: 700;
}

.pixel-text-medium {
    font-family: 'Courier New', monospace;
    font-size: 18px !important;
    font-weight: 700;
}

.pixel-text-small {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 18px !important;
    font-weight: 700;
    line-height: 1.6;
}

.pixel-text-tiny {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 16px !important;
    line-height: 1.5 !important;
    font-weight: 700;
}

.pixel-text-normal {
    font-family: 'Courier New', monospace;
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* Buttons - Comic Book Pixel Style */
.btn-pixel {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-transform: uppercase;
    border: var(--border-thick);
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        4px 4px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    letter-spacing: 0.1em;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.btn-pixel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.05) 2px,
        rgba(0,0,0,0.05) 4px
    );
    pointer-events: none;
    opacity: 0.3;
}

.btn-pixel:hover {
    transform: translate(2px, 2px);
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        2px 2px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-pixel:active {
    transform: translate(4px, 4px);
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Accessible focus state for all primary interactive elements */
.btn-pixel:focus-visible,
.btn-comic:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--manga-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--manga-blue) 0%, var(--manga-dark-blue) 100%);
    background-color: var(--manga-blue);
    color: var(--text-light);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--manga-dark-blue) 0%, #000814 100%);
    background-color: var(--manga-dark-blue);
}

.btn-primary:active {
    background: linear-gradient(135deg, #000814 0%, var(--manga-dark-blue) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--paper-yellow) 0%, #ffe8b3 100%);
    background-color: var(--paper-yellow);
    color: var(--text-dark);
    border-color: var(--manga-orange);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ffe8b3 0%, var(--paper-yellow) 100%);
    background-color: #ffe8b3;
}

.btn-secondary:active {
    background: linear-gradient(135deg, var(--paper-shadow) 0%, var(--paper-yellow) 100%);
}

.large-btn {
    padding: 18px 35px;
    font-size: 20px !important;
    letter-spacing: 0.15em;
}

/* Comic Book Style Buttons for Query Builder */
.btn-comic {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    border: 4px solid var(--border-comic);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    letter-spacing: 0.1em;
    padding: 12px 24px;
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        5px 5px 0 rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255,255,255,0.3);
    transform: perspective(500px) rotateX(1deg);
}

.btn-comic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.03) 3px,
        rgba(0,0,0,0.03) 6px
    );
    pointer-events: none;
    opacity: 0.4;
}

.btn-comic:hover {
    transform: perspective(500px) rotateX(0deg) translateY(-2px);
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        7px 7px 0 rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255,255,255,0.3);
}

.btn-comic:active {
    transform: perspective(500px) rotateX(0deg) translateY(2px);
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        2px 2px 0 rgba(0, 0, 0, 0.4),
        inset 0 3px 6px rgba(0,0,0,0.2);
}

.btn-clear {
    background: linear-gradient(135deg, #ffe8b3 0%, #ffd699 100%);
    background-color: #ffe8b3;
    color: var(--manga-red);
    border-color: var(--manga-red);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #ffd699 0%, #ffcc80 100%);
    border-color: #c62828;
    color: #c62828;
}

.btn-clear:active {
    background: linear-gradient(135deg, #ffcc80 0%, #ffd699 100%);
}

.btn-next {
    background: linear-gradient(135deg, var(--manga-blue) 0%, var(--manga-dark-blue) 100%);
    background-color: var(--manga-blue);
    color: var(--text-light);
    border-color: var(--manga-dark-blue);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.btn-next:hover {
    background: linear-gradient(135deg, var(--manga-dark-blue) 0%, #000814 100%);
    border-color: #000814;
}

.btn-next:active {
    background: linear-gradient(135deg, #000814 0%, var(--manga-dark-blue) 100%);
}

.btn-back {
    background: linear-gradient(135deg, var(--paper-yellow) 0%, #ffe8b3 100%);
    background-color: var(--paper-yellow);
    color: var(--manga-blue);
    border-color: var(--manga-blue);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.btn-back:hover {
    background: linear-gradient(135deg, #ffe8b3 0%, var(--paper-yellow) 100%);
    border-color: var(--manga-dark-blue);
    color: var(--manga-dark-blue);
}

.btn-back:active {
    background: linear-gradient(135deg, var(--paper-shadow) 0%, var(--paper-yellow) 100%);
}

.btn-execute {
    background: linear-gradient(135deg, var(--manga-red) 0%, #c62828 100%);
    background-color: var(--manga-red);
    color: var(--text-light);
    border-color: #c62828;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    padding: 16px 32px;
    font-size: 18px !important;
}

.btn-execute:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    border-color: #b71c1c;
}

.btn-execute:active {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
}

.step-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
    padding-top: 15px;
    border-top: 3px solid var(--border-comic);
}

/* Clickable Items */
.clickable-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clickable-item:hover {
    transform: scale(1.02);
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border: var(--border-medium);
    margin-top: 15px;
}

.results-table th {
    background: var(--manga-blue);
    color: var(--text-light);
    padding: 12px;
    text-align: left;
    font-weight: 700;
    border: var(--border-thin);
}

.results-table td {
    padding: 10px 12px;
    border: var(--border-thin);
    border-top: none;
}

.results-table tr:nth-child(even) {
    background: var(--paper-yellow);
}

/* Error Messages */
.error-message {
    background: var(--manga-red);
    color: var(--text-light);
    padding: 15px;
    border: var(--border-medium);
    margin: 15px 0;
    font-weight: 700;
}

.success-message {
    background: var(--manga-green);
    color: var(--text-light);
    padding: 15px;
    border: var(--border-medium);
    margin: 15px 0;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .desk-surface {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .query-builder-body {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto 1fr !important;
    }
}

/* SQL Syntax Highlighting for Live Preview */
.sql-highlighted {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.sql-highlighted .sql-keyword {
    color: var(--manga-blue);
    font-weight: 700;
    text-transform: uppercase;
}

.sql-highlighted .sql-select {
    color: var(--manga-green);
    font-weight: 600;
}

.sql-highlighted .sql-from {
    color: var(--manga-purple);
    font-weight: 600;
}

.sql-highlighted .sql-table {
    color: var(--manga-orange);
    font-weight: 600;
}

.sql-highlighted .sql-where {
    color: var(--manga-red);
    font-weight: 600;
}

.sql-highlighted .sql-join-condition {
    color: var(--manga-dark-blue);
    font-style: italic;
}

/* Highlight changing parts */
.sql-highlighted span[style*="background-color"] {
    animation: pulse-highlight 1.5s ease-in-out;
}

@keyframes pulse-highlight {
    0%, 100% {
        background-color: rgba(255, 255, 0, 0.3);
    }
    50% {
        background-color: rgba(255, 255, 0, 0.6);
    }
}

@media (max-width: 768px) {
    .landing-content {
        padding: 30px 20px;
    }
    
    .landing-title {
        font-size: 24px !important;
    }
    
    .desk-surface {
        gap: 15px;
        padding: 10px;
    }
    
    .evidence-pinboard {
        grid-template-columns: 1fr;
    }
}

.landing-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .detective-conan-logo {
    width: min(520px, 90vw);
    height: auto;
  }
  
  .landing-logo img {
    width: min(520px, 90vw);
    height: auto;
  }
/* Comic book 2-page spread layout */
.comic-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: min(1400px, 95vw);
    margin: 0.5rem auto;
    padding: 0;
    position: relative;
    height: calc(100vh - 1rem);
    min-height: calc(100vh - 1rem);
}

/* Page blocks */
.comic-page {
    background: #f8f3e8;
    border: 4px solid #1a1a1a;
    padding: 1.25rem;
    height: 100%;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Left page */
.left-page {
    border-right: 2px solid #1a1a1a;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    box-shadow: 
        inset -25px 0 30px rgba(0,0,0,0.15),
        -5px 0 15px rgba(0,0,0,0.1);
    background: linear-gradient(to right, 
        #f8f3e8 0%,
        #f5efe0 100%
    );
    overflow-y: auto;
}

/* Right page */
.right-page {
    border-left: 2px solid #1a1a1a;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 
        inset 25px 0 30px rgba(0,0,0,0.15),
        5px 0 15px rgba(0,0,0,0.1);
    background: linear-gradient(to left, 
        #f8f3e8 0%,
        #f5efe0 100%
    );
}

/* The comic "spine/gutter" - book binding effect */
.comic-spread::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: linear-gradient(to right,
        rgba(0,0,0,0.4) 0%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.4) 100%
    );
    border-left: 1px solid rgba(0,0,0,0.3);
    border-right: 1px solid rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 1;
}

/* Light paper grain texture */
.comic-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.02) 2px,
            rgba(0,0,0,0.02) 4px
        );
    background-size: 12px 12px, 100% 4px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Make the logo column look "poster-like" */
.comic-page .landing-logo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    justify-content: center;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.comic-page .landing-logo > * {
    width: 100%;
}

.comic-page .detective-conan-logo {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
    flex-shrink: 0;
    max-height: 40%;
    object-fit: contain;
}

.comic-page .conan-expert-img {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    padding: 0.5rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    flex-shrink: 0;
    max-height: 50%;
    object-fit: contain;
}

/* Right page text styling */
.right-page .landing-text {
    position: relative;
    z-index: 1;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.right-page .landing-title {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 1.5rem !important;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
    flex-shrink: 0;
    line-height: 1.2;
}

.right-page .landing-story {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.6);
    border-left: 4px solid var(--manga-blue);
    flex-shrink: 0;
}

.right-page .landing-story p {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem;
}

.right-page .story-intro {
    font-size: 13px !important;
    margin-bottom: 0.5rem;
}

.right-page .landing-goals,
.right-page .landing-instructions {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.5);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    flex-shrink: 0;
}

.right-page .goals-title,
.right-page .instructions-title {
    font-size: 15px !important;
    margin-bottom: 0.5rem;
}

.right-page .goals-list li,
.right-page .instructions-list li {
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin-bottom: 0.4rem;
    padding-left: 24px;
}

.right-page .goals-list li::before {
    font-size: 16px;
}

.right-page .instructions-list li::before {
    width: 20px;
    height: 20px;
    font-size: 12px;
}

/* Keep button at bottom */
.right-page .landing-start-btn {
    margin-top: auto;
    padding-top: 0.75rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 10px 25px !important;
    font-size: 14px !important;
}

/* Mobile: stack like a single page */
@media (max-width: 900px) {
    .comic-spread {
        grid-template-columns: 1fr;
        width: 95vw;
        margin: 1rem auto;
    }

    .comic-spread::before {
        display: none;
    }

    .left-page,
    .right-page {
        border: 4px solid #1a1a1a;
        border-radius: 12px;
        box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
        margin-bottom: 1rem;
    }
    
    .left-page {
        border-right: 4px solid #1a1a1a;
    }
    
    .right-page {
        border-left: 4px solid #1a1a1a;
    }
}
  