/* Main Site Styles - External CSS to comply with CSP */

/* Prevent scrolling on main index page (iframe handles all scrolling) */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    font-family: "Courier New", monospace;
    color: #00ff00;
}

/* Utility Classes */
.visually-hidden {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.responsive-image {
    max-width: 100%;
    height: auto;
}

.ko-fi-link {
    text-decoration: none;
    color: inherit;
}

.display-none {
    display: none;
}

.var-group-hidden {
    display: none;
}

/* Common FAQ Styles */
.faq-question-style {
    color: #00cc00;
}

.faq-answer-style {
    color: #00ff00;
    margin-left: 20px;
}

.text-center {
    text-align: center;
}

.margin-bottom-20 {
    margin-bottom: 20px;
}

.margin-bottom-15 {
    margin-bottom: 15px;
}

/* Common green styling */
.color-green {
    color: #00ff00;
}

.color-light-green {
    color: #00cc00;
}

/* Moved from index.html inline styles for CSP compliance */

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    color: #00ff00;
    text-decoration: none;
    font-weight: bold;
}

/* CRT screen effect */
.crt {
    animation: flicker 1s infinite;
}
@keyframes flicker {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}
/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 51%,
        transparent 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}
/* Container - Only for pages with sidebar layout */
.layout-sidebar .container {
    display: grid;
    grid-template-columns: 220px 1fr;
    height: 100vh;
}
/* Menu styles */
.menu {
  padding: 20px;
  border-right: 2px solid #00ff00;
  text-align: center;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* Smooth scrolling */
  scroll-behavior: smooth;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #00ff00 #000;
}

/* Webkit scrollbar styling for menu */
.menu::-webkit-scrollbar {
  width: 8px;
}

.menu::-webkit-scrollbar-track {
  background: #000;
  border-left: 1px solid #00ff00;
}

.menu::-webkit-scrollbar-thumb {
  background: #00ff00;
  border-radius: 4px;
}

.menu::-webkit-scrollbar-thumb:hover {
  background: #00ff88;
}
.menu-header {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 20px;
  color: #00ff00;
  text-align: center;
}
.menu-item {
    display: block; /* Ensures consistent spacing for all menu items */
    padding: 12px 10px;
    margin: 3px 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

/* Adjust menu item spacing for shorter screens */
@media screen and (min-width: 769px) and (max-height: 800px) {
    .menu-item {
        padding: 10px 8px;
        margin: 2px 0;
        font-size: 13px;
    }
}

@media screen and (min-width: 769px) and (max-height: 650px) {
    .menu-item {
        padding: 8px 6px;
        margin: 1px 0;
        font-size: 12px;
    }
}
.menu-item a {
    display: block; /* Makes the link take full width */
    color: #00ff00;
    text-decoration: none;
}
.content-frame {
    height: calc(100vh - 40px);
    padding: 0;
}
.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px #00ff00;
}
/* Active menu item */
.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid #00ff00;
}
/* Image item */
.image-item {
    display: block;
    padding: 10px;
    margin: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.image-item img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: clamp(80px, 25vh, 200px);
    object-fit: contain;
    transition: max-height 0.3s ease;
    display: block;
}

/* Progressive scaling based on viewport height */
@media screen and (min-width: 769px) {
    /* Very tall screens */
    @media (min-height: 1000px) {
        .image-item img {
            max-height: clamp(100px, 15vh, 160px);
        }
    }

    /* Standard desktop */
    @media (max-height: 999px) and (min-height: 850px) {
        .image-item img {
            max-height: clamp(80px, 13vh, 130px);
        }
        .image-item {
            padding: 6px;
        }
    }

    /* Medium height */
    @media (max-height: 849px) and (min-height: 750px) {
        .image-item img {
            max-height: clamp(70px, 11vh, 110px);
        }
        .image-item {
            padding: 5px;
        }
    }

    /* Shorter screens */
    @media (max-height: 749px) and (min-height: 650px) {
        .image-item img {
            max-height: clamp(60px, 10vh, 90px);
        }
        .image-item {
            padding: 4px;
        }
    }

    /* Very short screens */
    @media (max-height: 649px) {
        .image-item img {
            max-height: clamp(50px, 8vh, 70px);
        }
        .image-item {
            padding: 3px;
        }
    }
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid #00ff00;
    z-index: 1001;
    align-items: center;
    padding: 0 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 4px;
    margin-right: 15px;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo img {
    height: 30px;
    width: auto;
}

.mobile-title {
    color: #00ff00;
    font-family: "Courier New", monospace;
    font-size: 14px;
    font-weight: bold;
}

.mobile-breadcrumb {
    flex: 1;
    text-align: right;
    padding-right: 10px;
}

.mobile-breadcrumb-text {
    color: #00aa00;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: normal;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: #00ff00;
    margin: 2px 0;
    transition: 0.3s;
}
.menu-toggle {
    display: none;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .layout-sidebar .container {
        display: block;
        height: 100vh;
    }

    .menu {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 55vh;
        background: #000;
        border: 2px solid #00ff00;
        padding: 10px;
        z-index: 999;
        overflow-y: auto;
        display: none;
        box-sizing: border-box;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .menu.show {
        display: grid;
    }

    .menu-header {
        display: none;
    }

    .content-frame {
        width: 100%;
        height: 100vh;
        padding: 0;
        margin-top: 50px;
    }

    .content-frame.menu-open {
        margin-top: 60vh;
        height: calc(40vh - 50px);
        opacity: 0.7;
        background: rgba(0, 0, 0, 0.9);
    }

    .menu.show .menu-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 2px !important;
        margin: 0 !important;
        font-size: 11px !important;
        text-align: center !important;
        border: 1px solid #00ff00 !important;
        background: rgba(0, 255, 0, 0.1) !important;
        min-height: 24px !important;
        max-height: 24px !important;
        height: 24px !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
        line-height: 1.0 !important;
    }

    .menu.show .menu-item:hover {
        background: rgba(0, 255, 0, 0.3) !important;
        transform: scale(1.02) !important;
    }


    .image-item {
        display: none;
    }

    .mobile-header.menu-open .mobile-logo,
    .mobile-header.menu-open .mobile-breadcrumb {
        display: none;
    }

    .content-frame {
        flex: 1;
        height: calc(100vh - 50px);
        padding: 10px;
    }

    .content-frame.menu-open {
        margin-top: 60vh;
        height: calc(40vh - 50px);
        opacity: 0.7;
        background: rgba(0, 0, 0, 0.9);
    }
/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .menu {
        padding: 8px;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        max-height: 50vh;
    }

    .menu.show .menu-item {
        padding: 2px 1px !important;
        margin: 0 !important;
        font-size: 9px !important;
        min-width: auto !important;
        min-height: 20px !important;
        max-height: 20px !important;
        height: 20px !important;
        line-height: 1.0 !important;
    }

    .mobile-title {
        font-size: 12px;
    }

    .mobile-breadcrumb-text {
        font-size: 9px;
    }

    .menu-item.primary {
        padding: 1px 2px;
        font-size: 6px;
        min-width: 50px;
    }

    .menu-item.secondary {
        padding: 0px 1px;
        font-size: 6px;
        min-width: 40px;
        min-height: 10px;
    }

    .menu-section-title {
        font-size: 8px;
    }

    .header-container {
        font-size: 12px;
    }

    .content-frame {
        padding: 8px;
    }
}

/* Breadcrumb Navigation Styles */
.breadcrumb {
    font-size: 0.8em;
    color: #00aa00;
    margin-bottom: 20px;
    padding: 10px 0;
}

.breadcrumb a {
    color: #00ff00 !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb a:hover {
    color: #ffffff !important;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #004400;
}

/* Mobile breadcrumb optimization */
@media screen and (max-width: 768px) {
    .breadcrumb {
        display: none;
    }
}

/* Market Wizardry Page Specific Styles - moved from inline for CSP compliance */

/* Override body styling for market-wizardry page */
.market-wizardry-body {
    background-color: #000;
    color: #00ff00;
    font-family: "Courier New", monospace;
    padding: 20px;
    margin: 0;
}

/* Page-specific header styling */
.market-wizardry-header {
    text-align: center;
    margin-bottom: 30px;
}

.market-wizardry-h1 {
    color: #00ff00;
    font-size: 2.5em;
    margin: 20px 0;
    font-family: "Courier New", monospace;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Image container and grid styles */
.image-container {
    text-align: left;
    max-width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.grid-container img {
    max-width: 100%;
    height: auto;
    border: 3px solid #00ff00;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4), inset 0 0 20px rgba(0, 255, 0, 0.1);
    object-fit: contain;
    transition: all 0.3s ease;
}

.grid-container img:hover {
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.7), inset 0 0 30px rgba(0, 255, 0, 0.2);
    transform: scale(1.02);
}


/* Text box styling */
.text-box {
    color: #00ff00;
    border: 2px solid rgba(0, 255, 0, 0.5);
    padding: 20px;
    margin: auto;
}

/* iframe styling */
#contentIframe {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
}

iframe {
    border: none;
    margin: 0;
    width: 100%;
    height: 100%;
}

/* CRT divider animation */
.crt-divider {
    width: 100%;
    height: 1px;
    background-color: #00ff00;
    animation: scan 1s infinite;
    margin: 30px auto;
}

@keyframes scan {
    0% { opacity: 1; width: 0%; }
    50% { opacity: 0.5; }
    100% { opacity: 1; width: 100%; }
}

/* Mobile Responsive Styles for Market Wizardry */
@media screen and (max-width: 768px) {
    .market-wizardry-body {
        padding: 10px;
        font-size: 14px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }

    .text-box {
        padding: 15px;
        margin: 10px 0;
        max-height: none;
        overflow-y: visible;
        font-size: 0.9em;
        line-height: 1.4;
    }

    .crt-divider {
        width: 100%;
        height: 1px;
        background-color: #00ff00;
        animation: scan 1s infinite;
        margin: 30px auto;
    }

    iframe {
        width: 100%;
        height: 100%;
        margin: 0;
    }
}

@media screen and (max-width: 480px) {
    .market-wizardry-body {
        padding: 8px;
        font-size: 13px;
    }

    .grid-container {
        gap: 10px;
        padding: 8px;
    }

    .text-box {
        padding: 12px;
        margin: 8px 0;
        font-size: 0.8em;
        line-height: 1.3;
    }

    .crt-divider {
        width: 100%;
        height: 1px;
        background-color: #00ff00;
        animation: scan 1s infinite;
        margin: 30px auto;
    }

    iframe {
        width: 100%;
        height: 100%;
        margin: 0;
        border: none;
    }
}