/* Enhanced Cyber-Glow Palette Themes Management */
.dark-theme {
    --bg-main: #0a0e14;
    --bg-section: #111622;
    --bg-terminal: #05070a;
    --text-main: #c9d1d9;
    --accent: #2ea44f;
    --link: #58a6ff;
    --border: #21262d;
    --glow: rgba(46, 164, 79, 0.25);
    --text-glow: none;
}

.matrix-theme {
    --bg-main: #000000;
    --bg-section: #050505;
    --bg-terminal: #000000;
    --text-main: #00ff00;
    --accent: #00ff00;
    --link: #00ffbf;
    --border: #00ff00;
    --glow: rgba(0, 255, 0, 0.4);
    --text-glow: 0 0 8px #00ff00, 0 0 15px rgba(0, 255, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.4s, color 0.4s;
    position: relative;
    background-image: url('images/background.png');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.94), rgba(10, 14, 20, 0.98));
    opacity: 0.92;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header & LEAFOSEC Logo Custom Framing */
.site-banner {
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 40px rgba(153, 102, 255, 0.35), inset 0 0 20px rgba(153, 102, 255, 0.18);
}

.banner-image {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    max-height: 260px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    box-shadow: inset 0 0 40px rgba(153, 102, 255, 0.22);
}

header {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px -5px var(--glow);
}

.terminal-actions {
    display: flex;
    gap: 10px;
}

.terminal-action-btn {
    background: rgba(153, 102, 255, 0.15);
    border: 1px solid rgba(153, 102, 255, 0.35);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.terminal-action-btn:hover {
    background: rgba(153, 102, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(153, 102, 255, 0.16);
}

.header-main-flex {
    display: flex;
    gap: 25px;
    align-items: center;
}

.logo-frame {
    width: 180px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px var(--glow));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Make the header logo a small circular logo */
#portfolio-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.banner-image {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    max-height: 260px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* Layout mode classes - scoped adjustments */
.layout-desktop nav a {
    margin-right: 20px;
}

.layout-tablet .logo-frame {
    width: 140px;
}

.layout-tablet .portfolio-video {
    max-height: 50vh;
}

.layout-tablet .container {
    max-width: 720px;
}

.layout-mobile .header-main-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.layout-mobile .logo-frame {
    width: 120px;
}

.layout-mobile nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.layout-mobile nav a {
    display: inline-block;
    padding: 8px 10px;
    margin-right: 8px;
}

.layout-mobile #terminal-input {
    padding: 14px 12px;
    font-size: 1.05rem;
}

.layout-mobile .portfolio-video {
    aspect-ratio: 16/9;
    max-height: 40vh;
}

.layout-mobile .report-toggle-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
}

.layout-mobile .gallery-img {
    height: 120px;
}

.layout-mobile .img-modal-wrapper {
    max-width: 95vw;
    max-height: 85vh;
}

.layout-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.layout-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    min-width: 60px;
}

.layout-btn:hover {
    border-color: var(--link);
}

.layout-btn.active {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--glow);
}

/* Hamburger dropdown for layout controls */
.layout-hamburger {
    position: relative;
    display: inline-block;
}

.layout-hamburger-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.layout-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-section);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 6px;
    display: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    z-index: 50;
    min-width: 140px;
}

.layout-dropdown[aria-hidden="false"] {
    display: block;
}

.layout-dropdown .layout-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 6px;
}

.layout-dropdown .layout-btn:last-child {
    margin-bottom: 0;
}

.img-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
    z-index: 20000;
}

.img-modal[aria-hidden="false"] {
    display: flex;
}

.img-modal-wrapper {
    position: relative;
    max-width: 88vw;
    max-height: 86vh;
}

.img-modal-content {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    border: 1px solid rgba(153, 102, 255, 0.35);
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 0 36px rgba(153, 102, 255, 0.2);
}

.img-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 20001;
}

.img-modal-caption {
    color: #c9d1d9;
    margin-top: 12px;
    font-size: 0.95rem;
    text-align: center;
}

#theme-toggle {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 0 8px var(--glow);
    transition: all 0.2s ease;
}

#theme-toggle:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

nav {
    margin-top: 10px;
}

nav a {
    color: var(--link);
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--accent);
    text-shadow: var(--text-glow);
}

.header-top {
    margin-top: 20px;
    gap: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.header-typing {
    min-width: 220px;
    min-height: 1.6em;
    font-size: 1rem;
    color: var(--text-main);
}

.muted-text {
    color: #b0b8c4;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 4px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 0 14px var(--glow);
}

.btn-primary {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(46, 164, 79, 0.05);
}

.btn-primary:hover {
    background: var(--accent);
    color: #000;
}

.btn-ghost {
    color: var(--link);
    border-color: rgba(88, 166, 255, 0.35);
}

.btn-terminal {
    background: rgba(153, 102, 255, 0.15);
    border-color: rgba(153, 102, 255, 0.35);
}

.btn-small {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.82rem;
}

.action-row,
.terminal-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.terminal-intro,
.feedback-copy {
    margin-bottom: 10px;
}

section {
    background: var(--bg-section);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid rgba(153, 102, 255, 0.25);
    box-shadow: 0 0 18px rgba(153, 102, 255, 0.16), inset 0 0 6px rgba(153, 102, 255, 0.08);
}

h2 {
    color: var(--link);
    margin-bottom: 15px;
}

.mission-dashboard {
    padding: 22px;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dashboard-heading h2 {
    margin-bottom: 6px;
}

.dashboard-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--accent);
    border: 1px solid rgba(46, 164, 79, 0.35);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(46, 164, 79, 0.05);
    font-size: 0.8rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    min-height: 150px;
    padding: 14px;
    border: 1px solid rgba(153, 102, 255, 0.18);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 16px rgba(153, 102, 255, 0.08);
}

.metric-card strong {
    display: block;
    color: var(--text-main);
    margin: 4px 0 8px;
}

.metric-card p {
    color: #8b949e;
    font-size: 0.86rem;
}

.metric-label {
    color: var(--link);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.tag:hover {
    border-color: var(--link);
}

/* Collapsible Gallery Section */
.collapsible-gallery {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(153, 102, 255, 0.2);
    border-radius: 6px;
    padding: 0;
    transition: all 0.3s ease;
    margin-top: 30px;
    box-shadow: 0 0 24px rgba(153, 102, 255, 0.14), inset 0 0 10px rgba(153, 102, 255, 0.08);
}

.gallery-toggle {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
}

.gallery-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.gallery-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.gallery-content {
    max-height: 8000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px 16px 16px;
}

.gallery-content.collapsed {
    max-height: 0;
    padding: 0 16px;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(153, 102, 255, 0.14);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 16px rgba(153, 102, 255, 0.12);
}

.gallery-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-5px);
}

.gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-img {
    opacity: 1;
}

.gallery-caption {
    flex-grow: 1;
    padding: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Responsive Gallery */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-img {
        height: 150px;
    }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tool-category-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(153, 102, 255, 0.16);
    padding: 15px;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 18px rgba(153, 102, 255, 0.1);
}

.tool-category-card h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 5px;
    text-shadow: var(--text-glow);
}

.tool-media-preview {
    width: 100%;
    height: 100px;
    background: #05070a;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Row layout for multiple previews inside a single card */
.tool-media-previews-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.tool-media-previews-row .tool-media-preview {
    flex: 1 1 0;
    height: 90px;
    min-width: 80px;
}

.tool-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: zoom-in;
}

.tool-media-preview:hover .tool-img {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: inset 0 0 15px rgba(46, 164, 79, 0.4);
}

.tool-category-card:hover .tool-img {
    opacity: 1;
}

.tool-item {
    margin-bottom: 12px;
}

.tool-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.progress-bg {
    background: #161b22;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-fill {
    background: linear-gradient(90deg, var(--border), var(--accent));
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 0 8px var(--accent);
}

/* Explanations Dashboard Box */
.ops-brief {
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--link);
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
}

.ops-brief p {
    margin-bottom: 10px;
}

.brief-list {
    list-style: none;
    padding-left: 10px;
}

.brief-list li {
    margin-bottom: 8px;
    color: #8b949e;
}

.brief-list strong {
    color: var(--link);
}

/* Filter Navigation Elements */
.filter-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 0, 0.03);
    box-shadow: 0 0 10px var(--glow);
}

.field-report-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 2px solid var(--accent);
}

.field-report-details h5 {
    color: var(--link);
    font-size: 0.95rem;
    margin-top: 12px;
    margin-bottom: 4px;
}

.field-report-details p {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 10px;
}

.report-download-zone {
    margin-top: 15px;
    text-align: right;
}

.download-cyber-btn {
    display: inline-block;
    border: 1px dashed var(--accent);
    padding: 8px 16px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    background: rgba(0, 255, 0, 0.01);
}

.download-cyber-btn:hover {
    border-style: solid;
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 12px var(--accent);
}

/* Cards Accordion Grid */
.writeup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.writeup-card {
    background: rgba(0, 0, 0, 0.17);
    border: 1px solid rgba(153, 102, 255, 0.16);
    padding: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 18px rgba(153, 102, 255, 0.12);
}

.writeup-card:hover {
    transform: translateY(-3px);
    border-color: var(--link);
    box-shadow: 0 6px 20px var(--glow);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.difficulty {
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

.difficulty.easy {
    background: #238636;
    color: #fff;
}

.difficulty.hard {
    background: #da3633;
    color: #fff;
}

.platform {
    color: #8b949e;
}

.report-toggle-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

.report-toggle-btn:hover {
    background: var(--accent);
    color: #000;
}

.report-content {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    color: #8b949e;
}

.report-content.open {
    display: block;
}

.report-content h4 {
    color: var(--accent);
    margin-bottom: 5px;
}

/* Media Evidence Containers */
.media-container {
    margin-top: 15px;
    margin-bottom: 20px;
    background: #05070a;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid rgba(153, 102, 255, 0.18);
    box-shadow: 0 0 16px rgba(153, 102, 255, 0.1);
}

.media-container h5 {
    color: var(--text-main);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: normal;
    border-left: 3px solid var(--accent);
    padding-left: 8px;
}

.portfolio-image,
.portfolio-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.portfolio-video {
    max-height: 450px;
    background-color: #000;
}

/* Tactical Sandbox Console */
#terminal {
    background-color: var(--bg-terminal);
    border: 1px solid rgba(153, 102, 255, 0.18);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.75), 0 0 30px rgba(153, 102, 255, 0.12);
    position: relative;
}

.system-telemetry {
    position: fixed;
    right: 24px;
    top: 24px;
    background: rgba(5, 7, 10, 0.9);
    border: 1px solid rgba(153, 102, 255, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 200px;
    color: #c9d1d9;
    font-size: 0.8rem;
    box-shadow: 0 0 20px rgba(153, 102, 255, 0.15);
    z-index: 999;
}

.system-telemetry h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--accent);
}

.system-telemetry div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.system-telemetry span:last-child {
    color: #8b949e;
}

.terminal-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

.terminal-title {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--link);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #8b949e;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #718096;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

.status-dot.active {
    background: #2ea44f;
}

.terminal-body {
    max-height: 340px;
    overflow-y: auto;
    padding: 18px;
}

.terminal-output {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.terminal-output div {
    white-space: pre-wrap;
    line-height: 1.55;
}

.terminal-welcome {
    color: var(--text-main);
    opacity: 0.95;
}

.terminal-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.08);
}

.terminal-footer .prompt {
    flex-shrink: 0;
}

#terminal-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#terminal-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(153, 102, 255, 0.8);
    box-shadow: 0 0 24px rgba(153, 102, 255, 0.2);
}

#terminal-input::placeholder {
    color: rgba(201, 209, 217, 0.5);
}

.output-success {
    color: #2ea44f;
    text-shadow: var(--text-glow);
}

.output-error {
    color: #f85149;
}

.output-info {
    color: #58a6ff;
}

.output-secret {
    color: #ff79c6;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-top: 8px;
}

.responsive-table table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.responsive-table th,
.responsive-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.responsive-table th {
    background: rgba(88, 166, 255, 0.12);
    color: var(--link);
}

.responsive-table tr:last-child td {
    border-bottom: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.contact-card {
    display: flex;
    min-height: 96px;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid rgba(88, 166, 255, 0.28);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 0 18px var(--glow);
}

.contact-card span {
    color: var(--link);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.contact-card strong {
    font-size: 0.95rem;
}

.form-field {
    display: block;
    margin-bottom: 10px;
    color: var(--text-main);
}

.form-control {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 14px var(--glow);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.report-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.78);
    z-index: 20000;
}

.report-modal[aria-hidden="false"] {
    display: flex;
}

.report-modal-panel {
    position: relative;
    width: min(900px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    border: 1px solid rgba(153, 102, 255, 0.35);
    border-radius: 8px;
    background: #090d14;
    box-shadow: 0 0 40px rgba(153, 102, 255, 0.22);
}

.report-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 28px;
}

.report-modal-kicker {
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.brief-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.brief-columns h3 {
    color: var(--link);
    margin-bottom: 8px;
    font-size: 1rem;
}

.brief-columns ul,
.report-modal-body ul {
    padding-left: 20px;
    color: var(--text-main);
}

.report-modal-body {
    border-top: 1px dashed var(--border);
    padding-top: 16px;
    color: #8b949e;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: #8b949e;
}

/* Responsive Scaling Viewports */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .system-telemetry {
        position: static;
        margin-bottom: 12px;
        width: 100%;
    }

    .header-main-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .logo-frame {
        width: 130px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-heading,
    .form-actions,
    .terminal-console-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-grid,
    .contact-grid,
    .brief-columns {
        grid-template-columns: 1fr;
    }

    .terminal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tool-media-previews-row {
        flex-direction: column;
    }
}

/* THM Badges - above footer, faded, no box */
#thm-badges {
    text-align: center;
    margin: 20px 0 10px 0;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

#thm-badges:hover {
    opacity: 0.85;
}

.thm-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-items: center;
}

.thm-item {
    flex: 0 0 auto;
    width: 280px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thm-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(153, 102, 255, 0.5), 0 0 40px rgba(153, 102, 255, 0.25);
}

.thm-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

.thm-item:hover img {
    filter: grayscale(0%);
}

/* Responsive: even smaller on mobile */
@media (max-width: 600px) {
    .thm-item {
        width: 180px;
        height: 130px;
    }
    .thm-grid {
        gap: 14px;
    }
}

/* ===== REVIEWS PAGE STYLES ===== */
.reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.review-card {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--glow);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.review-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
}

.review-date {
    font-size: 0.85rem;
    color: #8b949e;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.star {
    font-size: 1.2rem;
    line-height: 1;
}

.star-filled {
    color: #f0c040;
    text-shadow: 0 0 6px rgba(240, 192, 64, 0.5);
}

.star-empty {
    color: #30363d;
}

.review-rating-label {
    font-size: 0.85rem;
    color: #8b949e;
    margin-left: 4px;
}

.review-comment {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.reviews-empty {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #8b949e;
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin-top: 20px;
}

.reviews-empty p {
    font-size: 1.05rem;
}

/* End of stylesheet (restored to pre-mobile-change state) */
