:root {
    --menu-bg: #0a0a0a;
    --menu-item-bg: #262626;
    --menu-text: #e0e0e0;
    --menu-text-hover: #00f3ff;
    --menu-selected-bg: #333333;
    --body-bg: #121212;
    --container-bg: #1c1c1c;
    --heading-text: #ff0055;
    --body-text: #cccccc;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--body-bg);
    color: var(--body-text);
    font-family: var(--font-main);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--menu-text-hover);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.hero-logo {
    max-width: 80%;
    height: auto;
    margin: 0 auto 2rem auto;
    display: block;
}

/* Layout */
header {
    background-color: var(--menu-bg);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--heading-text);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--heading-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-area a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    background-color: var(--menu-item-bg);
    color: var(--menu-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--menu-text-hover);
    background-color: var(--menu-selected-bg);
    text-decoration: none;
    transform: translateY(-2px);
}

nav ul li a.active {
    background-color: var(--menu-selected-bg);
    color: var(--menu-text-hover);
    font-weight: bold;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container {
    background-color: var(--container-bg);
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Components */
.hero-section {
    padding: 4rem 2rem;
    background-color: var(--menu-item-bg);
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 8px;
    border: 1px solid var(--heading-text);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.5rem;
    color: var(--body-text);
    max-width: 800px;
    margin: 0 auto;
}

.feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: center;
}

.feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

.feature-row .feature-content {
    flex: 1;
    min-width: 300px;
}

.feature-row .feature-image {
    flex: 1;
    min-width: 300px;
    background-color: var(--menu-item-bg);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

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

.card {
    background-color: var(--menu-item-bg);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.2s;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--heading-text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-text);
    margin-bottom: 1rem;
}

/* Smart Viewer (Carousel) */
.smart-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    background: var(--menu-item-bg);
    padding: 1rem;
    border-radius: 8px;
    position: relative;
    min-height: 400px;
    flex-wrap: nowrap; /* Prevent buttons wrapping */
}

.smart-viewer-content {
    flex: 1;
    text-align: center;
    max-width: 800px;
    position: relative;
    width: 100%;
    overflow: hidden; /* Constrain items */
}

.viewer-item {
    display: none; /* Critical for carousel logic */
    animation: fadeIn 0.3s ease-in-out;
}

.viewer-item.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.viewer-btn {
    background: var(--heading-text);
    color: var(--body-bg);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 4px;
    transition: filter 0.2s;
    user-select: none;
    min-width: 50px;
    flex-shrink: 0; /* Prevent shrinking */
}

.viewer-btn:hover {
    filter: brightness(1.2);
}

.viewer-btn.prev {
    order: -1;
}

.viewer-counter {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--body-text);
}

.viewer-item h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.viewer-item p {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.video-wrapper {
    margin-top: auto;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Cinematic Grid */
.cinematic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.cinematic-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #444;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.cinematic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
    border-color: var(--heading-text);
}

.cinematic-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--heading-text);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cinematic-card p {
    color: #ccc;
    font-size: 1.1rem;
}

.cinematic-card strong {
    color: #fff;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Navigation & Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--heading-text);
}

/* Scoped Buttons to avoid breaking forms */
.btn, .btn-sub, .btn-nav, .btn-cta, .subscribe-btn {
    cursor: pointer;
    background-color: var(--menu-text-hover);
    color: var(--menu-bg);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 1rem;
    display: inline-block;
    text-decoration: none;
    line-height: 1.5;
}

.btn-sub { background: #ff0000; color: white; }
.btn-nav { background: var(--heading-text); color: var(--body-bg); }
.btn:hover, .btn-sub:hover, .btn-nav:hover, .btn-cta:hover, .subscribe-btn:hover {
    filter: brightness(1.2);
    text-decoration: none;
}

/* Forms - Improved Design */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

label {
    font-weight: bold;
    color: var(--heading-text);
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--body-text);
    background-color: var(--menu-item-bg);
    color: var(--menu-text);
    font-family: inherit;
    width: 100%;
    font-size: 1rem;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--heading-text);
    cursor: pointer;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--menu-item-bg);
    padding: 1rem;
    border-radius: 4px;
}

/* General button styling for forms */
button[type="submit"] {
    cursor: pointer;
    background-color: var(--menu-text-hover);
    color: var(--menu-bg);
    border: none;
    padding: 1rem 2rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 1.1rem;
}
button[type="submit"]:hover {
    filter: brightness(1.2);
}

/* Footer */
footer {
    background-color: var(--menu-bg);
    padding: 3rem 1rem;
    text-align: center; /* Restore centering */
    margin-top: auto;
    border-top: 2px solid var(--heading-text); /* Restore line */
}

.cta-section {
    text-align: center;
    margin-top: 4rem;
    padding: 3rem 1rem;
    background: var(--container-bg);
    border-top: 1px solid var(--heading-text);
}

/* Themes */
.theme-umbrella { --menu-bg: #0b1016; --menu-item-bg: #1c2633; --menu-text: #e0e2e5; --menu-text-hover: #00f7ff; --menu-selected-bg: #2c3e50; --body-bg: #121212; --container-bg: #1e1e1e; --heading-text: #ffffff; --body-text: #cfcfcf; }
.theme-creative-media { --menu-bg: #050b14; --menu-item-bg: #16202c; --menu-text: #e6e6e6; --menu-text-hover: #00f2ff; --menu-selected-bg: #922b21; --body-bg: #111111; --container-bg: #1e1e1e; --heading-text: #00f2ff; --body-text: #cccccc; }
.theme-data-services { --menu-bg: #0b1016; --menu-item-bg: #1f2b38; --menu-text: #e0e2e5; --menu-text-hover: #00f7ff; --menu-selected-bg: #1c2b3a; --body-bg: #121212; --container-bg: #1e1e1e; --heading-text: #ffffff; --body-text: #cfcfcf; }
.theme-oddonomy { --menu-bg: #0a0a0a; --menu-item-bg: #262626; --menu-text: #e0e0e0; --menu-text-hover: #00f3ff; --menu-selected-bg: #333333; --body-bg: #121212; --container-bg: #1c1c1c; --heading-text: #ff0055; --body-text: #cccccc; }
.theme-demos { --menu-bg: #050505; --menu-item-bg: #222f3e; --menu-text: #ffffff; --menu-text-hover: #ff00cc; --menu-selected-bg: #576574; --body-bg: #0a0a0a; --container-bg: #141414; --heading-text: #00ff9d; --body-text: #bfbfbf; }
.theme-quiz { --menu-bg: #0f0f0f; --menu-item-bg: #2d3436; --menu-text: #ffffff; --menu-text-hover: #f1c40f; --menu-selected-bg: #181818; --body-bg: #212121; --container-bg: #2c2c2c; --heading-text: #00d2ff; --body-text: #e0e0e0; }
.theme-soundz { --menu-bg: #121212; --menu-item-bg: #2c2c2c; --menu-text: #ffffff; --menu-text-hover: #ff00cc; --menu-selected-bg: #0a0a0a; --body-bg: #0a0a0a; --container-bg: #1f1f1f; --heading-text: #ffcc00; --body-text: #dcdcdc; }
.theme-space { --menu-bg: #1a0b2e; --menu-item-bg: #341f4d; --menu-text: #ffffff; --menu-text-hover: #ff9100; --menu-selected-bg: #4a148c; --body-bg: #0b0312; --container-bg: #241236; --heading-text: #00ffe5; --body-text: #e0dce6; }
.theme-sleep { --menu-bg: #2c3e50; --menu-item-bg: #4b6584; --menu-text: #ecf0f1; --menu-text-hover: #e84393; --menu-selected-bg: #1a252f; --body-bg: #5e678c; --container-bg: #ffffff; --heading-text: #e6f8ff; --body-text: #182326; }
.theme-ai-games { --menu-bg: #0a0e14; --menu-item-bg: #1e272e; --menu-text: #ffffff; --menu-text-hover: #00e5ff; --menu-selected-bg: #d63031; --body-bg: #151515; --container-bg: #222f3e; --heading-text: #ffcc00; --body-text: #dfe6e9; }
.theme-people { --menu-bg: #2d2d2d; --menu-item-bg: #4b4b4b; --menu-text: #ffffff; --menu-text-hover: #ff7675; --menu-selected-bg: #636e72; --body-bg: #f5f6fa; --container-bg: #ffffff; --heading-text: #6c5ce7; --body-text: #040404; }
.theme-scenery { --menu-bg: #0f2b3e; --menu-item-bg: #2c5364; --menu-text: #ffffff; --menu-text-hover: #ff9f1a; --menu-selected-bg: #c44569; --body-bg: #f0f8ff; --container-bg: #ffffff; --heading-text: #1caeae; --body-text: #141717; }
.theme-stories { --menu-bg: #2e1a36; --menu-item-bg: #4b3b55; --menu-text: #f0e6d2; --menu-text-hover: #ff7b00; --menu-selected-bg: #206a72; --body-bg: #1c1510; --container-bg: #2b221e; --heading-text: #ffa502; --body-text: #d1ccc0; }
.theme-core { --menu-bg: #1c1c1c; --menu-item-bg: #333333; --menu-text: #e0e0e0; --menu-text-hover: #ff0055; --menu-selected-bg: #f1c40f; --body-bg: #0f0f0f; --container-bg: #262626; --heading-text: #ff0055; --body-text: #b0b0b0; }
.theme-education { --menu-bg: #2f3640; --menu-item-bg: #57606f; --menu-text: #f5f6fa; --menu-text-hover: #ff3f34; --menu-selected-bg: #ffffff; --body-bg: #dfe4ea; --container-bg: #ffffff; --heading-text: #20bf6b; --body-text: #0b130a; }
/* Update Cinematic Grid for 2 columns */
.cinematic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); /* Wider min-width forces fewer columns */
    gap: 2rem;
    margin: 2rem 0;
}
@media (max-width: 950px) {
    .cinematic-grid {
        grid-template-columns: 1fr;
    }
}

/* Voice Options Table Styling */
.voice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background-color: var(--menu-item-bg);
    color: var(--menu-text);
}

.voice-table th, .voice-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #444;
}

.voice-table th {
    background-color: var(--menu-selected-bg);
    color: var(--heading-text);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.voice-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.voice-table tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.voice-table audio {
    width: 100%;
    max-width: 250px; /* Constrain width but allow shrinking */
    display: block;
}

/* Cinematic Card Improvements */
.cinematic-card p {
    margin-bottom: 1rem;
}

.cinematic-card p:last-child {
    margin-top: 1.5rem; /* Separate Play Style */
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cinematic-card em {
    color: var(--menu-text-hover); /* Highlight the label */
    font-style: normal;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}
