/* 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;
    font-size: 20px;
    line-height: 1.6;
}

/* Landing Page */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    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: 20px;
}

.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;
}

.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;
    height: calc(100vh - 40px);
    min-height: 600px;
    position: relative;
    z-index: 1;
}

/* Case File Section */
.case-file-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    min-height: 0;
}

/* 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: pointer;
    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;
}

.case-file:hover {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(-8px) scale(1.02);
    box-shadow: 
        0 0 0 3px rgba(139,115,85,0.4),
        0 12px 24px rgba(0, 0, 0, 0.5),
        0 24px 48px rgba(0, 0, 0, 0.3),
        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.15),
        inset -20px 0 0 rgba(0,0,0,0.08);
    border-top-color: #ff8c00;
    border-color: #a0522d;
}

.case-file:active {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(-3px) scale(0.98);
    box-shadow: 
        0 0 0 3px rgba(139,115,85,0.3),
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 4px 8px rgba(255,255,255,0.5),
        inset 0 -4px 8px rgba(0,0,0,0.2);
}

.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);
}

.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;
    height: 100%;
    min-height: 0;
}

.board-view {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.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: var(--border-thick);
    box-shadow: var(--shadow-panel);
    padding: 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.board-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

/* Evidence Pinboard */
.evidence-pinboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: minmax(150px, auto);
    grid-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;
    grid-column: span var(--card-span, 5);
    transform: rotate(var(--rotation, 0deg));
}

.pinboard-card:nth-child(3n+1) { --card-span: 4; }
.pinboard-card:nth-child(3n+2) { --card-span: 6; }
.pinboard-card:nth-child(3n) { --card-span: 5; }

.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);
}

.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;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.database-files {
    display: flex;
    flex-direction: column;
    background: 
        /* Tech grid */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 15px,
            rgba(0,255,255,0.05) 15px,
            rgba(0,255,255,0.05) 16px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 15px,
            rgba(0,255,255,0.05) 15px,
            rgba(0,255,255,0.05) 16px
        ),
        /* Dark tech background */
        linear-gradient(135deg, #1a1f3a 0%, #0f1419 50%, #1a1f3a 100%);
    border: 3px solid #00ffff;
    border-left: 8px solid #00ffff;
    padding: 20px;
    overflow: hidden;
    min-height: 0;
    box-shadow: 
        0 0 15px rgba(0,255,255,0.4),
        inset 0 0 20px rgba(0,255,255,0.1),
        4px 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.database-files::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #00ffff 10%,
        #ff00ff 50%,
        #00ffff 90%,
        transparent 100%
    );
    box-shadow: 0 0 8px rgba(0,255,255,0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0,255,255,0.4);
    position: relative;
    z-index: 2;
}

.files-header h3 {
    color: #00ffff;
    text-shadow: 
        0 0 10px rgba(0,255,255,0.8),
        0 0 20px rgba(0,255,255,0.4);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
}

.table-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

/* Table Item - Detective Case File Style */
.table-item {
    background: linear-gradient(135deg, #f4e4bc 0%, #e8d5a3 100%);
    background-color: #f4e4bc; /* Manila folder color */
    border: var(--border-thick);
    border-left: 8px solid var(--manga-red);
    padding: 15px 15px 15px 20px;
    margin-bottom: 15px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        4px 4px 0 rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transform: perspective(500px) rotateX(1deg);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
}

.table-item::before {
    content: '';
    position: absolute;
    top: -3px;
    right: 15px;
    width: 30px;
    height: 20px;
    background: var(--manga-red);
    border: var(--border-thin);
    border-bottom: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
    z-index: 1;
}

.table-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.table-item:active {
    cursor: grabbing;
}

.table-item:hover {
    transform: perspective(500px) rotateX(0deg) translateY(-3px) translateX(3px);
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.1),
        6px 6px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    border-left-color: var(--manga-orange);
}

.table-item.dragging {
    opacity: 0.6;
    transform: perspective(500px) rotateX(5deg) rotateZ(2deg);
}

.table-item h3 {
    font-size: 20px !important;
    font-weight: 700;
    margin-bottom: 10px;
    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.5);
    position: relative;
    z-index: 2;
}

.table-item p {
    font-size: 16px !important;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.column-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-yellow) 100%);
    background-color: var(--paper);
    border: var(--border-medium);
    border-left: 4px solid var(--manga-green);
    cursor: grab;
    font-size: 15px !important;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.column-item::before {
    content: '📄';
    margin-right: 8px;
    font-size: 14px;
}

.column-item:hover {
    background: linear-gradient(135deg, var(--paper-yellow) 0%, #fff9e6 100%);
    transform: translateX(3px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
    border-left-color: var(--manga-orange);
}

.column-item.dragging {
    opacity: 0.6;
    transform: rotate(2deg) scale(1.05);
    z-index: 100;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
}

.column-item.star-item {
    border-left-color: var(--manga-yellow);
    background: linear-gradient(135deg, #fff9d0 0%, #fff9e6 100%);
    font-weight: 700;
    font-size: 18px !important;
}

.column-item.star-item::before {
    content: '⭐';
    margin-right: 8px;
}

.column-item.star-item:hover {
    background: linear-gradient(135deg, #fff9e6 0%, #fff9d0 100%);
    border-left-color: var(--manga-orange);
}

.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 - High-Tech Manga Style */
.computer-monitor {
    display: flex;
    flex-direction: column;
    background: 
        /* Scan lines effect */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,255,255,0.03) 2px,
            rgba(0,255,255,0.03) 4px
        ),
        /* Grid pattern */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(0,255,255,0.02) 20px,
            rgba(0,255,255,0.02) 21px
        ),
        /* Dark tech background */
        linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    border: 4px solid #00ffff;
    border-image: linear-gradient(135deg, #00ffff, #ff00ff, #00ff00) 1;
    padding: 20px;
    min-height: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 0 20px rgba(0,255,255,0.5),
        0 0 40px rgba(0,255,255,0.3),
        inset 0 0 30px rgba(0,255,255,0.1),
        0 8px 16px rgba(0,0,0,0.6);
}

.computer-monitor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,0,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.computer-monitor::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #00ffff 20%,
        #ff00ff 50%,
        #00ffff 80%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(0,255,255,0.8);
    animation: scanline 3s linear infinite;
    z-index: 1;
}

@keyframes scanline {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.monitor-frame {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: rgba(10,14,39,0.7);
    border: 2px solid rgba(0,255,255,0.3);
    box-shadow: 
        inset 0 0 20px rgba(0,255,255,0.2),
        0 0 10px rgba(0,255,255,0.3);
}

.screen-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0,255,255,0.02) 0px,
            rgba(0,255,255,0.02) 1px,
            transparent 1px,
            transparent 2px
        );
}

/* Query Tabs */
.query-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: var(--border-medium);
}

.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;
}

.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;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: rgba(10,14,39,0.6);
    border: 2px solid rgba(0,255,255,0.4);
    padding: 20px;
    box-shadow: 
        inset 0 0 20px rgba(0,255,255,0.2),
        0 0 15px rgba(0,255,255,0.3);
}

.visual-builder-step {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.visual-builder-step.active {
    display: flex;
    flex-direction: column;
}

.visual-builder-step h3 {
    color: #00ffff;
    text-shadow: 
        0 0 10px rgba(0,255,255,0.8),
        0 0 20px rgba(0,255,255,0.4);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.15em;
    border-bottom: 2px solid rgba(0,255,255,0.4);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.visual-builder-step .step-description {
    color: rgba(0,255,255,0.8);
    text-shadow: 0 0 5px rgba(0,255,255,0.5);
    margin-bottom: 15px;
}

.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: rgba(10,14,39,0.8);
    border: 2px solid rgba(0,255,255,0.3);
    padding: 20px;
    box-shadow: 
        inset 0 0 15px rgba(0,255,255,0.15),
        0 0 10px rgba(0,255,255,0.2);
    position: relative;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,255,255,0.5) 50%,
        transparent 100%
    );
    box-shadow: 0 0 5px rgba(0,255,255,0.6);
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: var(--border-medium);
}

/* Selected Columns - High-Tech Style */
.selected-columns {
    background: rgba(10,14,39,0.9);
    border: 2px solid rgba(0,255,255,0.4);
    padding: 15px;
    margin-top: 15px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 
        inset 0 0 15px rgba(0,255,255,0.15),
        0 0 10px rgba(0,255,255,0.2);
    position: relative;
}

.selected-columns::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,255,255,0.5) 50%,
        transparent 100%
    );
    box-shadow: 0 0 5px rgba(0,255,255,0.6);
}

.selected-columns legend {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0,255,255,0.8);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.selected-columns h4 {
    font-size: 16px !important;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--manga-blue);
}

.selected-column-item {
    background: var(--paper);
    border: var(--border-thin);
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.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: 2px solid var(--border-comic);
    margin-bottom: 12px;
    align-items: center;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.condition-connector {
    padding: 12px;
    border: 2px solid var(--border-comic);
    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;
}

.condition-item select,
.condition-item input {
    padding: 10px;
    border: var(--border-medium);
    background: var(--paper);
    font-size: 16px !important;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    min-width: 150px;
}

.condition-item select {
    cursor: pointer;
}

.condition-remove-btn {
    background: var(--manga-red);
    color: var(--text-light);
    border: var(--border-medium);
    padding: 10px 15px;
    font-size: 16px !important;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.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;
}

.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;
    height: 98vh !important;
    max-width: 98vw !important;
    max-height: 98vh !important;
    padding: 20px;
}

.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);
}

.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 */
#query-detail-modal .modal-content {
    width: 98vw !important;
    height: 98vh !important;
    max-width: 98vw !important;
    max-height: 98vh !important;
}

.query-detail-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: var(--border-medium);
}

.query-detail-task {
    font-size: 18px !important;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--manga-blue);
}

.query-detail-sql {
    font-family: 'Courier New', monospace;
    font-size: 14px !important;
    background: var(--paper-yellow);
    padding: 15px;
    border: var(--border-medium);
    word-break: break-all;
}

.query-detail-results {
    margin-top: 20px;
}

.query-detail-results .results-table {
    font-size: 16px !important;
}

.query-detail-results .results-table th {
    font-size: 16px !important;
    padding: 12px !important;
}

.query-detail-results .results-table td {
    font-size: 16px !important;
    padding: 12px !important;
}

/* 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);
}

.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;
}

.step-actions::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,255,255,0.4) 50%,
        transparent 100%
    );
}

/* 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;
    }
}

@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;
    }
}
