/* ThrottleCard Website Styles */

:root {
    /* Default: Baltimore & Ohio inspired brass theme */
    --text-color: #f0d9ab;
    --color-one: #1f2433;
    --color-two: #2e3442;
    --color-three: #d1b58d;
    --color-four: #f0d9ab;
    --color-five: #a68c6b;
    --color-six: #6196c2;

    /* Derived colors */
    --brass-light: var(--color-four);
    --brass-medium: var(--color-three);
    --brass-dark: var(--color-five);
    --navy-dark: var(--color-one);
    --navy-medium: var(--color-two);
    --accent-color: var(--color-six);
    --text-light: var(--text-color);
    --emergency-red: #df383f;
    --text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 16px rgba(0, 0, 0, 0.6);
    --glow-primary: 0 0 20px rgba(209, 181, 141, 0.3);
    --glow-accent: 0 0 20px rgba(97, 150, 194, 0.3);
}

/* Theme definitions */
[data-theme="baltimoreOhio"] {
    --text-color: #f0d9ab;
    --color-one: #1f2433;
    --color-two: #2e3442;
    --color-three: #d1b58d;
    --color-four: #f0d9ab;
    --color-five: #a68c6b;
    --color-six: #6196c2;
}

[data-theme="burlingtonNorthern"] {
    --text-color: #ffffff;
    --color-one: #1f4729;
    --color-two: #336640;
    --color-three: #d1d1de;
    --color-four: #ebebf7;
    --color-five: #b8b8c4;
    --color-six: #ffffff;
}

[data-theme="santaFe"] {
    --text-color: #ffffff;
    --color-one: #8c1f1f;
    --color-two: #a62626;
    --color-three: #d1d1de;
    --color-four: #ebebf7;
    --color-five: #b8b8c4;
    --color-six: #6196c2;
}

[data-theme="bnsf"] {
    --text-color: #ffffff;
    --color-one: #1f381f;
    --color-two: #d97326;
    --color-three: #d1b58d;
    --color-four: #f0d9ab;
    --color-five: #a68c6b;
    --color-six: #f28c40;
}

[data-theme="pennsy"] {
    --text-color: #f0d9ab;
    --color-one: #591f1f;
    --color-two: #803333;
    --color-three: #d1b58d;
    --color-four: #f0d9ab;
    --color-five: #a68c6b;
    --color-six: #d9bf73;
}

[data-theme="nycSystem"] {
    --text-color: #000000;
    --color-one: #262633;
    --color-two: #9999a6;
    --color-three: #bfbfcc;
    --color-four: #bfbfcc;
    --color-five: #bfbfcc;
    --color-six: #bfbfcc;
}

[data-theme="conrail"] {
    --text-color: #ffffff;
    --color-one: #1a2666;
    --color-two: #334d99;
    --color-three: #d1d1de;
    --color-four: #ebebf7;
    --color-five: #b8b8c4;
    --color-six: #ffffff;
}

[data-theme="unionPacific"] {
    --text-color: #ffffff;
    --color-one: #40454d;
    --color-two: #595e66;
    --color-three: #f2b833;
    --color-four: #f2b833;
    --color-five: #f2b833;
    --color-six: #d92626;
}

[data-theme="southernPacific"] {
    --text-color: #ffffff;
    --color-one: #8c1f1f;
    --color-two: #d95933;
    --color-three: #d1b58d;
    --color-four: #f0d9ab;
    --color-five: #a68c6b;
    --color-six: #f27340;
}

[data-theme="southernRailway"] {
    --text-color: #f2d940;
    --color-one: #265926;
    --color-two: #337333;
    --color-three: #f2d940;
    --color-four: #fae659;
    --color-five: #d9bf26;
    --color-six: #408c40;
}

[data-theme="csx"] {
    --text-color: #ffffff;
    --color-one: #002954;
    --color-two: #004073;
    --color-three: #f2b826;
    --color-four: #f7c233;
    --color-five: #e6ab1a;
    --color-six: #edb32b;
}

[data-theme="norfolkSouthern"] {
    --text-color: #ffffff;
    --color-one: #141414;
    --color-two: #262626;
    --color-three: #f2f2f2;
    --color-four: #ffffff;
    --color-five: #d9d9d9;
    --color-six: #a61a1a;
}

[data-theme="proDark"] {
    --text-color: #ebebf2;
    --color-one: #141417;
    --color-two: #1f1f24;
    --color-three: #2673e6;
    --color-four: #3380f2;
    --color-five: #1a59cc;
    --color-six: #de3845;
}

[data-theme="proDarkPurple"] {
    --text-color: #ebebf2;
    --color-one: #141417;
    --color-two: #1f1f24;
    --color-three: #a640fc;
    --color-four: #bf4dff;
    --color-five: #8c26d9;
    --color-six: #de3845;
}

[data-theme="proDarkGreen"] {
    --text-color: #ebebf2;
    --color-one: #141417;
    --color-two: #1f1f24;
    --color-three: #009926;
    --color-four: #0db333;
    --color-five: #00731a;
    --color-six: #de3845;
}

[data-theme="proDarkRed"] {
    --text-color: #ebebf2;
    --color-one: #141417;
    --color-two: #1f1f24;
    --color-three: #d91a33;
    --color-four: #e62640;
    --color-five: #b30d26;
    --color-six: #3845de;
}

/* Update brass colors based on theme */
body {
    --brass-light: var(--color-four);
    --brass-medium: var(--color-three);
    --brass-dark: var(--color-five);
    --navy-dark: var(--color-one);
    --navy-medium: var(--color-two);
    --accent-color: var(--color-six);
    --text-light: var(--text-color);
}

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

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Georgia', serif;
    background-color: var(--navy-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)),
        url('hero-background.jpg') center/cover;
    background-attachment: fixed;
    padding: 8rem 2rem 4rem;
    text-align: center;
    border-bottom: 4px solid var(--brass-medium);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px);
    animation: steam 20s linear infinite;
}

@keyframes steam {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(209, 181, 141, 0.1);
}

.hero-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-icon {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.hero-qr {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Mobile hero layout adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 2rem 4rem;
        min-height: 60vh;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .hero-text {
        text-align: center;
        min-width: auto;
    }

    .hero-qr {
        order: 3;
        justify-content: center;
    }

    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero {
        padding: 7rem 2rem 4rem;
    }

    .hero-content {
        gap: 1.5rem;
    }

    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }
}

.app-icon {
    width: 150px;
    height: 150px;
    border-radius: 32px;
    border: 4px solid var(--brass-medium);
    margin-bottom: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.app-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.title {
    font-size: 4rem;
    color: var(--brass-light);
    margin: 0 0 0.25rem 0;
    text-shadow: var(--text-shadow), 0 0 24px rgba(209, 181, 141, 0.5);
    font-weight: bold;
    letter-spacing: 3px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--brass-medium);
    margin: 0 0 1rem 0;
    text-shadow: var(--text-shadow), 0 0 16px rgba(209, 181, 141, 0.4);
    font-weight: normal;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    opacity: 0.95;
    transition: color 0.3s ease;
    text-shadow: var(--text-shadow);
    position: relative;
    z-index: 2;
}

/* Button Styles */
.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    color: var(--navy-dark);
    background: linear-gradient(135deg, var(--brass-light) 0%, var(--brass-medium) 100%);
    border: 2px solid var(--brass-dark);
    border-radius: 12px;
    text-decoration: none;
    margin: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-family: 'Georgia', serif;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

/* Download Container for Hero Section */
.hero-download-container {
    display: inline-block;
    text-align: center;
}

/* QR Code Styles */
.qr-code {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0;
    border-radius: 12px;
    border: 2px solid var(--brass-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* QR code in hero download container (for other instances) */
.hero-download-container .qr-code {
    margin: 1rem auto 0;
}

/* QR code styling for bottom CTA sections */
.cta-button + .qr-code {
    display: block;
    margin: 1.5rem auto 0;
}

.qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--brass-medium);
}

/* Newsletter Section Styles */
.newsletter-section {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--brass-medium);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--brass-dark), var(--brass-light), var(--brass-dark));
}

.newsletter-section h3 {
    color: var(--brass-light);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.newsletter-section p {
    color: var(--text-light);
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* MailerLite form customization */
.ml-embedded {
    max-width: 500px;
    margin: 0 auto;
}

/* Style MailerLite form elements to match railway themes */
.ml-embedded iframe {
    border-radius: 8px !important;
    border: 2px solid var(--brass-dark) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Override MailerLite form styles */
.ml-embedded .ml-form-embedWrapper,
.ml-embedded .ml-form-embed {
    background-color: var(--navy-medium) !important;
    border-radius: 8px !important;
}

.ml-embedded .ml-form-embedBody {
    background-color: var(--navy-medium) !important;
    padding: 1.5rem !important;
}

.ml-embedded .ml-form-embedBody .ml-form-embedBodyRow {
    background-color: transparent !important;
}

.ml-embedded .ml-form-fieldRow input[type="email"] {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 2px solid var(--brass-dark) !important;
    border-radius: 6px !important;
    color: var(--text-light) !important;
    padding: 0.75rem 1rem !important;
    font-family: 'Georgia', serif !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.ml-embedded .ml-form-fieldRow input[type="email"]:focus {
    border-color: var(--brass-medium) !important;
    box-shadow: 0 0 0 2px rgba(209, 181, 141, 0.2) !important;
    outline: none !important;
}

.ml-embedded .ml-form-fieldRow input[type="email"]::placeholder {
    color: rgba(240, 217, 171, 0.6) !important;
}

.ml-embedded .ml-form-embedSubmit button {
    background: linear-gradient(135deg, var(--brass-medium), var(--brass-light)) !important;
    border: 2px solid var(--brass-dark) !important;
    border-radius: 6px !important;
    color: var(--navy-dark) !important;
    padding: 0.75rem 2rem !important;
    font-family: 'Georgia', serif !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

.ml-embedded .ml-form-embedSubmit button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    background: linear-gradient(135deg, var(--brass-light), var(--brass-medium)) !important;
}

.ml-embedded .ml-form-embedSubmit button:active {
    transform: translateY(0) !important;
}

/* Style all text elements in the form */
.ml-embedded .ml-form-embedHeader h4,
.ml-embedded .ml-form-embedHeader h3,
.ml-embedded .ml-form-embedHeader h2,
.ml-embedded .ml-form-embedHeader h1 {
    color: var(--brass-light) !important;
    font-family: 'Georgia', serif !important;
    font-size: 1.3rem !important;
    margin-bottom: 0.5rem !important;
}

.ml-embedded .ml-form-embedHeader p,
.ml-embedded .ml-form-embedBody p,
.ml-embedded .ml-form-embedBody div,
.ml-embedded .ml-form-embedBody span,
.ml-embedded .ml-form-embedBody label,
.ml-embedded .ml-form-embedBody .ml-form-fieldRow .ml-field-group label {
    color: var(--text-light) !important;
    opacity: 0.9 !important;
    font-family: 'Georgia', serif !important;
}

/* Override any remaining text colors */
.ml-embedded * {
    color: var(--text-light) !important;
}

/* But keep the button text dark for readability */
.ml-embedded .ml-form-embedSubmit button,
.ml-embedded .ml-form-embedSubmit button * {
    color: var(--navy-dark) !important;
}

/* Override any success/error message colors */
.ml-embedded .ml-form-successBody h4,
.ml-embedded .ml-form-successBody p,
.ml-embedded .ml-form-errorBody h4,
.ml-embedded .ml-form-errorBody p {
    color: var(--text-light) !important;
    font-family: 'Georgia', serif !important;
}

/* Responsive adjustments for the form */
@media (max-width: 768px) {
    .ml-embedded {
        max-width: 100%;
    }
    
    .ml-embedded .ml-form-embedBody {
        padding: 1rem !important;
    }
    
    .ml-embedded .ml-form-embedSubmit button {
        width: 100% !important;
        padding: 1rem !important;
    }
}

/* Full width newsletter sections */
.newsletter-section.full-width {
    grid-column: 1 / -1;
    max-width: none;
}

/* Main Content Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 100px;
    /* Account for fixed header */
}

/* Wider container for large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
}

/* Responsive container padding for fixed header */
@media (min-width: 1200px) {
    .container {
        padding-top: 90px;
    }
}

@media (max-width: 1199px) {
    .container {
        padding-top: 85px;
    }
}

@media (max-width: 768px) {
    .container {
        padding-top: 80px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Screenshot Gallery Section */
.screenshot-section {
    background: var(--navy-medium);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
    border: 2px solid var(--brass-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--brass-dark), var(--brass-medium), var(--brass-dark));
    transition: background 0.3s ease;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Desktop optimizations - more columns and compact layout */
@media (min-width: 1200px) {
    .screenshot-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .section {
        padding: 2rem 3rem;
        margin: 1.5rem 0;
    }

    .container {
        padding: 1rem 2rem;
    }

    /* Compact feature cards on desktop */
    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .feature-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* More compact screenshots */
    .screenshot-image {
        min-height: 250px;
        max-height: 350px;
    }

    .screenshot-caption {
        padding: 1rem;
        font-size: 0.85rem;
    }

    /* Compact controller and protocol sections */
    .controller-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .protocol-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .controller-card,
    .protocol-card {
        padding: 1.5rem;
    }

    .controller-card h4,
    .protocol-card h4 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    /* More efficient button mapping */
    .button-mapping {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .mapping-section h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .mapping-section li {
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1600px) {
    .screenshot-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Side-by-side sections for ultra-wide screens */
    .main-content-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .wide-section {
        grid-column: 1 / -1;
    }
}

.screenshot-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--brass-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.screenshot-placeholder {
    min-height: 300px;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brass-medium);
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
    transition: all 0.3s ease;
}

.screenshot-image {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    position: relative;
    border-radius: 8px;
}

/* Loading animation for images */
.screenshot-image[loading] {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Better responsiveness for different screen sizes */
@media (max-width: 768px) {
    .screenshot-image {
        min-height: 250px;
        max-height: 400px;
    }
}

.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
    color: var(--text-light);
    padding: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Features Section */
.section {
    background: var(--navy-medium);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
    border: 2px solid var(--brass-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--brass-dark), var(--brass-medium), var(--brass-dark));
    transition: background 0.3s ease;
}

.section h2 {
    color: var(--brass-medium);
    font-size: 2.5rem;
    margin: 0 0 2rem 0;
    text-shadow: var(--text-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--brass-dark);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brass-medium);
    transform: scaleX(0);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--brass-medium);
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--brass-medium);
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}

.feature-card h3 {
    color: var(--brass-light);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.feature-card p {
    color: var(--text-light);
    opacity: 0.85;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* Railway Themes Section */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* More compact themes on desktop */
@media (min-width: 1200px) {
    .themes-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 0.75rem;
    }

    .theme-badge {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Tab Navigation Styles */
.tab-navigation {
    background: var(--navy-medium);
    border-radius: 0;
    margin: 0;
    border: none;
    border-bottom: 3px solid var(--brass-medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality on desktop */
.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    padding: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
}

.hamburger-menu {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--brass-light);
}

.mobile-title {
    color: var(--brass-light);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-medium);
    border-bottom: 2px solid var(--brass-medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-dropdown .tab-button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
}

.mobile-dropdown .tab-button:last-child {
    border-bottom: none;
}

.mobile-dropdown .tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-button {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    border: 2px solid transparent;
    flex-shrink: 0;
    min-width: max-content;
}

/* Desktop tab button scaling */
@media (min-width: 1024px) and (max-width: 1199px) {
    .desktop-nav {
        justify-content: flex-start;
        padding: 1rem 1.5rem;
    }

    .desktop-nav .tab-button {
        flex-shrink: 0;
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .desktop-nav {
        overflow-x: visible;
    }

    .desktop-nav .tab-button {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        flex: 1;
        justify-content: center;
        max-width: 140px;
        min-width: 120px;
    }
}

@media (min-width: 1400px) {
    .desktop-nav .tab-button {
        padding: 1rem 1.75rem;
        font-size: 1.05rem;
        max-width: 160px;
        min-width: 140px;
    }
}

@media (min-width: 1600px) {
    .desktop-nav .tab-button {
        padding: 1.1rem 2rem;
        font-size: 1.1rem;
        max-width: 180px;
        min-width: 160px;
    }
}

.tab-button:hover {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--brass-medium), var(--brass-light));
    color: var(--navy-dark);
    opacity: 1;
    border: 2px solid var(--brass-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

/* Tab Content Styles */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overview content side-by-side layout */
.overview-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1200px) {
    .overview-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }

    .video-section {
        margin: 0;
    }

    .getting-started-section {
        margin: 0;
    }

    .getting-started-section .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .getting-started-section .feature-card {
        padding: 1.5rem;
    }

    .getting-started-section .feature-card h3 {
        font-size: 1.1rem;
    }

    .getting-started-section .feature-card p {
        font-size: 0.9rem;
    }
}

@media (min-width: 1600px) {
    .overview-content {
        gap: 4rem;
    }

    .getting-started-section .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .getting-started-section .feature-card {
        padding: 2rem;
    }

    .getting-started-section .feature-card h3 {
        font-size: 1.2rem;
    }

    .getting-started-section .feature-card p {
        font-size: 0.95rem;
    }
}

/* Responsive Navigation */
@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-nav {
        display: none;
    }
}

@media (max-width: 1023px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }
}

/* Mobile dropdown scrollbar styling */
.mobile-dropdown::-webkit-scrollbar {
    width: 4px;
}

.mobile-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-dropdown::-webkit-scrollbar-thumb {
    background: var(--brass-medium);
    border-radius: 2px;
}

.mobile-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--brass-light);
}

.theme-badge {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--brass-dark);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.theme-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-badge:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-badge:hover::before {
    opacity: 0.1;
}

.theme-badge.active {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.theme-badge.active::before {
    opacity: 0.2;
}

/* Protocols Section */
.protocol-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.protocol-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--brass-dark);
    text-align: center;
    transition: all 0.3s ease;
}

.protocol-card h4 {
    color: var(--brass-light);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.protocol-icon {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--navy-medium);
    border-top: 4px solid var(--brass-medium);
    margin: 4rem 0 -20px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    transition: all 0.3s ease;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--brass-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--brass-light);
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Demos section full width container */
.demos-full-width-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 2rem;
    margin-top: 2rem;
}

/* Demos Videos Grid */
.demos-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 0 auto;
    max-width: 1600px;
    justify-content: center;
    width: 100%;
}

.demo-video-container {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--brass-medium);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.demo-video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
    border-color: var(--brass-light);
}

.demo-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--navy-dark);
}

.demo-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.demo-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.demo-video-overlay.playing {
    opacity: 0;
    pointer-events: none;
}

.demo-play-button {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--brass-medium), var(--brass-light));
    border: 3px solid var(--brass-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-dark);
    font-size: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.demo-play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.demo-video-controls {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-video-container:hover .demo-video-controls {
    opacity: 1;
}

.demo-control-button {
    background: var(--navy-medium);
    color: var(--brass-light);
    border: 2px solid var(--brass-medium);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.demo-control-button:hover {
    background: var(--brass-medium);
    color: var(--navy-dark);
    transform: scale(1.05);
}

.demo-video-info {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
}

.demo-video-title {
    color: var(--brass-light);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.demo-video-description {
    color: var(--text-light);
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.demo-video-date {
    color: var(--brass-medium);
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Mobile responsive adjustments for demos */
@media (max-width: 768px) {
    .demos-videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        margin: 1.5rem auto 0;
    }
    
    .demo-video-container {
        min-width: auto;
    }
    
    .demo-play-button {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .demo-control-button {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Tablet responsive adjustments for demos */
@media (max-width: 1024px) and (min-width: 769px) {
    .demos-videos-grid {
        padding: 0 1.5rem;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Full Screen Video Modal */
.fullscreen-video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.fullscreen-video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-video-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: var(--navy-medium);
    border-radius: 16px;
    border: 3px solid var(--brass-medium);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fullscreen-close {
    position: absolute;
    top: 5%;
    right: 5%;
    background: var(--navy-medium);
    color: var(--brass-light);
    border: 2px solid var(--brass-medium);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fullscreen-close:hover {
    background: var(--brass-medium);
    color: var(--navy-dark);
    transform: scale(1.1);
}

.fullscreen-video-wrapper {
    flex: 1;
    position: relative;
    background: var(--navy-dark);
}

.fullscreen-video-player {
    width: 100%;
    height: 100%;
}

.fullscreen-video-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-video-wrapper:hover .fullscreen-video-controls {
    opacity: 1;
}

.fullscreen-control-button {
    background: var(--navy-medium);
    color: var(--brass-light);
    border: 2px solid var(--brass-medium);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fullscreen-control-button:hover {
    background: var(--brass-medium);
    color: var(--navy-dark);
    transform: scale(1.1);
}

.fullscreen-video-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-top: 2px solid var(--brass-dark);
    max-height: 150px;
    overflow-y: auto;
}

.fullscreen-video-title {
    color: var(--brass-light);
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.fullscreen-video-description {
    color: var(--text-light);
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.5;
}

/* Mobile adjustments for fullscreen modal */
@media (max-width: 768px) {
    .fullscreen-video-content {
        width: 95%;
        height: 85%;
    }
    
    .fullscreen-close {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        top: 3%;
        right: 3%;
    }
    
    .fullscreen-control-button {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .fullscreen-video-controls {
        bottom: 15px;
        left: 15px;
        gap: 12px;
    }
    
    .fullscreen-video-info {
        padding: 1rem;
    }
    
    .fullscreen-video-title {
        font-size: 1.2rem;
    }
    
    .fullscreen-video-description {
        font-size: 0.9rem;
    }
}

/* Animation for modal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Theme indicator */
.theme-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--navy-medium);
    color: var(--brass-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--brass-medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 2rem 1.5rem;
    }

    .feature-grid,
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .theme-indicator {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        text-align: center;
    }
}

/* Vintage gauge animation */
@keyframes gauge-needle {

    0%,
    100% {
        transform: rotate(-45deg);
    }

    50% {
        transform: rotate(45deg);
    }
}

.gauge-icon {
    display: inline-block;
    animation: gauge-needle 3s ease-in-out infinite;
}

/* Feature badges */
.premium-badge,
.beta-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.premium-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: 1px solid #e6c200;
}

.beta-badge {
    background: linear-gradient(135deg, var(--accent-color), rgba(97, 150, 194, 0.8));
    color: white;
    border: 1px solid var(--accent-color);
}

.feature-card:hover .premium-badge {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.feature-card:hover .beta-badge {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(97, 150, 194, 0.3);
}

/* Special styling for specific themes */
[data-theme="norfolkSouthern"] .title,
[data-theme="unionPacific"] .title {
    text-transform: uppercase;
}

[data-theme="nycSystem"] .feature-card,
[data-theme="nycSystem"] .protocol-card,
[data-theme="nycSystem"] .theme-badge {
    font-family: 'Copperplate', 'Georgia', serif;
}

/* NYC System theme typography and color adjustments */
[data-theme="nycSystem"] .title,
[data-theme="nycSystem"] .subtitle {
    font-family: 'Copperplate', 'Copperplate Gothic', 'Copperplate Gothic Light', fantasy, serif;
}

[data-theme="nycSystem"] .tagline {
    color: #bfbfcc;
}

/* Game Controller Section */
.controller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.controller-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--brass-dark);
    text-align: center;
    transition: all 0.3s ease;
}

.controller-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--brass-medium);
}

.controller-card h4 {
    color: var(--brass-light);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.controller-card ul {
    margin-bottom: 1.5rem;
}

.controller-card li {
    color: var(--text-light);
    opacity: 0.85;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.controller-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.controller-link:hover {
    background: var(--accent-color);
    color: var(--navy-dark);
    transform: translateX(5px);
}

.button-mapping {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--brass-dark);
}

.mapping-section h4 {
    color: var(--brass-medium);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.mapping-section ul {
    list-style: none;
    padding: 0;
}

.mapping-section li {
    color: var(--text-light);
    opacity: 0.85;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.button-badge {
    background: var(--navy-dark);
    color: var(--brass-light);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--brass-dark);
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Screenshot Modal */
.screenshot-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-modal.visible {
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.screenshot-modal.visible .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--brass-light);
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--brass-medium);
    transform: rotate(90deg);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--brass-dark);
}

.modal-caption {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 600px;
    padding: 0 2rem;
    opacity: 0.9;
}

/* Make screenshots clickable */
.screenshot-item {
    cursor: pointer;
}

.screenshot-image {
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-image {
    transform: scale(1.03);
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .modal-close {
        top: 20px;
        right: 20px;
        background: var(--navy-medium);
        border-radius: 50%;
        border: 2px solid var(--brass-medium);
    }

    .modal-image {
        border-radius: 8px;
    }

    .modal-caption {
        font-size: 1rem;
        margin-top: 1rem;
    }
}