/* Subtitle for solar panel content */
.solar-panel-subtitle {
    text-align: center;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    color: #cccccc;
    margin-bottom: 16px;
    margin-top: 0px;
    padding: 4px 16px;
    width: calc(100% - 48px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
/* Title for solar panel content */
.solar-panel-title {
    text-align: center;
    font-size: 1.2em;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    margin-bottom: 0px;
    margin-top: 4px;
    padding: 4px 16px;
    width: calc(100% - 48px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
/* Content inside solar panel */
.solar-panel-content {
    width: 100%;
    height: 100%; /* Take full height of the panel */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 12px 24px 24px 24px; /* Reduced top padding */
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content exceeds panel height */
    overflow-x: hidden; /* Prevent horizontal overflow */
    /* Ensure smooth content transitions */
    transition: opacity 0.3s ease-in-out;
}
/* White panel next to solar system frame */
.solar-panel {
    width: 100%;
    max-width: 820px;
    background: #08435571;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: box-shadow 0.3s, border 0.3s;
}

/* Main panel specifically for the solar system container */
.solar-panel-main {
    width: 100%; /* Full width of the wrapper */
    min-height: 400px; /* Minimum usable height */
    max-height: 600px; /* Maximum height */
    background: #08435571;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s, border 0.3s;
    position: absolute; /* Take out of document flow */
    top: 54px; /* Position below the controls */
    left: 0;
    box-sizing: border-box; /* Include padding and border in width calculation */
    padding-top: 8px;
    height: auto; /* Let content determine the height */
}

/* Panel controls container for solar system frame */
/* Main Panel Wrapper - contains controls and main panel */
.main-panel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Small gap between controls and main panel */
    position: relative; /* Positioning context for the absolute panel */
    flex: 1; /* Allow it to take up available space */
    
}

/* Panel Controls - now positioned directly above main panel */
.panel-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin: 0;
    /* margin-left: 48px; /* Align with solar-panel-main content, not margin */
    height: 54px; /* Reserve space for the controls */
    position: relative; /* Keep it in the flow */
    z-index: 1; /* Ensure controls are above the absolute panel */
}

.pixel-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Container for text and progress bar on the right */
.control-text-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.pixel-label {
    color: #FFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: bold;
}

.pixel-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.pixel-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pixel-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border: 2px solid #666;
    image-rendering: pixelated;
}

.pixel-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #666;
    transition: .4s;
    image-rendering: pixelated;
}

input:checked + .pixel-toggle-slider {
    background-color: #4CAF50;
    border-color: #45a049;
}

input:focus + .pixel-toggle-slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .pixel-toggle-slider:before {
    transform: translateX(16px);
    background-color: #fff;
}

/* Countdown Container */
.countdown-container {
    width: 100%;
    max-width: 150px;
    display: flex;
    justify-content: center;
}

.countdown-bar {
    width: 64px;
    height: 8px;
    overflow: hidden;
    image-rendering: pixelated;
}

.countdown-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    width: 100%;
    transition: width 0.1s linear;
    image-rendering: pixelated;
}

/* Reset countdown container positioning when inside panel-controls */
.panel-controls .countdown-container {
    position: static;
    transform: none;
    margin: 0;
}

/* Adjust content padding when inside main panel to avoid overlap with controls */
.solar-panel-main .solar-panel-content {
    padding-top: 12px; /* Reduced space for controls at top */
}

/* Frame for solar panel slider */
.solar-panel-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
}
.solar-panel-slider {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 12px;
}
.panel-nav-btn {
    background: #001f3f;
    color: #ffe600;
    border: 2px solid #0074D9;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 2px 8px #0002;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-nav-btn:hover {
    background: #0074D9;
    color: #fff;
}
/* Responsive flex container for solar panel content */
.solar-panel-content-flex {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 24px;
}

/* Center content-flex when inside main panel */
.solar-panel-main .solar-panel-content-flex {
  justify-content: center;
  align-items: center;
  margin-top: 0; /* No margin needed since titles are in normal flow */
  min-height: 0; /* Allow content to shrink if needed */
}


@media (max-width: 600px) {
  .solar-panel-content-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .solar-panel-content-flex img {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
  }
  .solar-panel-content-flex iframe {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
/* Circular buttons for solar system frames */
.solar-system-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    margin-top: auto;
    position: static;
}
.circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #0074D9;
    background: #001f3f;
    cursor: pointer;
    transition: background 0.2s;
}
.circle-btn:hover {
    background: #0074D9;
}
.circle-btn-filled {
    background: #0074D9;
    box-shadow: 0 0 0 3px #ffffff00, 0 0 8px #0074D9;
    border-color: #ffffff00;
}
.solar-system-frame {
    position: relative;
}
@media (max-width: 1200px) {
    .solar-system-buttons {
        flex-direction: row;
        position: static;
        left: auto;
        top: auto;
        transform: none;
        justify-content: center;
        margin-bottom: 12px;
    }
}
/* Reduce line spacing for header h3 elements */
.site-header h3 {
    margin-top: 2px;
    margin-bottom: 2px;
}
/* Title for each solar system frame */
.solar-system-title {
    text-align: center;
    font-size: 1.2em;
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
    color: #fff;
    margin-bottom: 8px;
    margin-top: 0px;
}
/* Remove stray closing brace to fix CSS syntax */
/* Center solar system canvas */
.solar-system-container {
  position: relative; /* Establish positioning context for the absolute panel */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start; /* Align items to the top */
  align-content: center;
  gap: 24px;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 32px;
  margin-bottom: 0;
  min-height: 490px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0 24px 180px 24px; /* Increased bottom padding to prevent overlap */
  box-sizing: border-box;
  flex-shrink: 0;
}

footer {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: block;
}

@media (max-width: 1200px) {
    .solar-system-container {
        flex-direction: column;
        align-items: center;
        padding: 0 16px 96px 16px;
    }
    .solar-system-frame {
        margin-bottom: 24px;
    }
    .solar-panel {
        margin-bottom: 0px;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex;
    }
    .main-panel-wrapper {
        width: 100%;
        max-width: 820px; /* Match the max-width of the solar-panel */
    }
    .solar-panel-main {
        position: relative; /* Override absolute positioning */
        top: auto; /* Reset top property */
        left: auto; /* Reset left property */
        width: 100%; /* Use full width of the wrapper */
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        height: auto; /* Allow height to adjust to content */
        min-height: 300px; /* Smaller minimum for mobile */
        max-height: none; /* Remove maximum height constraint */
        overflow: visible; /* Allow content to be visible */
    }
    .solar-panel-content {
        height: auto; /* Allow content to determine height */
        overflow: visible; /* No scrollbars, content determines panel size */
    }
    .contact-form-container {
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex;
    }
    .panel-controls {
        margin-left: 0; /* Remove left margin for mobile */
    }
}

.solar-system-frame {
    border: none;
    border-radius: 16px;
    background: none;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    min-height: 400px;
    height: auto;
    box-sizing: border-box;
}

/* Sticky header styles */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(0, 31, 63, 0.95);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 10;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    padding-top: 24px;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* Header content container */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header logo container */
.header-logo {
    flex-shrink: 0;
}

/* Octopus logo styling */
.octopus-logo {
    width: 60px;
    height: auto;
    filter: brightness(1.2) contrast(1.1);
    image-rendering: auto;
}

/* Company info octopus logo styling */
.company-info-octopus-logo {
    width: 300px;
    height: auto;
    filter: brightness(.5) contrast(1.1);
    image-rendering: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -25%);
    z-index: -1;
    opacity: 0.3;
}

/* Header text container */
.header-text {
    text-align: center;
}

.header-text h1,
.header-text h3 {
    margin: 0;
}

.header-text h3 {
    margin-top: 2px;
}

/* Global overflow control */
html {
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    background-color: #001f3f;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
}
/* Frame around Contact Us section */
.contact-form-container {
border: none;
border-radius: 12px;
padding: 40px 24px 24px 24px;
background: #08435571;
box-shadow: none;
margin-bottom: 32px;
margin-top: 32px;
max-width: 400px;
margin-left: auto;
margin-right: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
font-family: 'Courier New', Courier, monospace;
}
#star-canvas, #splash-canvas {
    pointer-events: auto;
    z-index: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    overflow: hidden;
}

/* Floating planet title overlay */
.planet-title-overlay {
    position: fixed;
    background: none;
    color: #fff;
    padding: 0;
    border-radius: 0;
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
    font-size: 10px;
    text-shadow: 2px 2px 0px #000;
    border: none;
    box-shadow: none;
    z-index: 150;
    pointer-events: none;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: none;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.planet-title-overlay.visible {
    opacity: 1;
}

/* Mobile responsive adjustments for planet title overlay */
@media (max-width: 768px) {
    .planet-title-overlay {
        font-size: 8px;
        padding: 0;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .planet-title-overlay {
        font-size: 7px;
        padding: 0;
        max-width: 120px;
    }
}

/* Company Information Container */
.company-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 64px auto;
    padding: 24px;
    background: rgba(8, 67, 85, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1;
    position: relative;
}

.company-info-content {
    text-align: center;
    max-width: 800px;
    padding: 32px;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
}

.company-info-title {
    font-size: 2em;
    color: #ffe600;
    margin-bottom: 24px;
    margin-top: 0;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 2px 2px 0px #000;
}

.company-info-text {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 32px;
    color: #cccccc;
    font-family: 'Courier New', Courier, monospace;
}

.company-stats {
    display: flex;
    justify-content: space-around;
    gap: 32px;
    margin-top: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #0074D9;
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.panels-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 32px auto;
    padding: 24px;
}

#stacked-panels {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    width: 100%;
}

.panels-container .solar-panel {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.site-header,
.solar-system-container,
.panels-container,
.solar-panel,
.solar-system-frame,
footer {
    z-index: 1;
    position: relative;
}

/* Pixel Art Toggle Switch Styles */
.pixel-toggle-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;   
   
    width: fit-content;
    image-rendering: pixelated;
    
}

.pixel-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    letter-spacing: 1px;
    margin-top: 0px;
}

.pixel-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.pixel-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pixel-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #333;
    transition: none;
    border: 2px solid #666;
    border-radius: 12px;
    image-rendering: pixelated;
}

.pixel-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: #ccc;
    transition: transform 0.1s steps(6, end);
    border: 1px solid #999;
    border-radius: 50%;
    image-rendering: pixelated;
}

input:checked + .pixel-toggle-slider {
    background: #4CAF50;
    border-color: #45a049;
}

input:checked + .pixel-toggle-slider:before {
    transform: translateX(21px) translateY(-50%);
    background: #fff;
    border-color: #ddd;
}

.pixel-toggle-slider:hover {
    border-color: #888;
}

input:checked + .pixel-toggle-slider:hover {
    background: #5CBF60;
    border-color: #4a9;
}

/* Countdown Timer Bar Styles */
.countdown-container {
    display: flex;
    justify-content: center;
    margin: 2px auto 0;
    width: fit-content;
}

.countdown-bar {
    width: 64px;
    height: 8px;
    position: relative;
    image-rendering: pixelated;
}

.countdown-fill {
    height: 100%;
    width: 100%;
    background: #fff;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.1s linear;
    image-rendering: pixelated;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .solar-system-container {
        padding: 0 12px 96px 12px;
        gap: 16px;
    }
    
    .solar-system-frame {
        max-width: 100%;
        width: 100%;
        padding: 8px 12px;
    }
    
    .company-info-container {
        margin: 32px auto;
        padding: 16px;
        width: calc(100% - 32px);
        max-width: calc(100vw - 32px);
    }
    
    .company-info-content {
        padding: 20px;
    }
    
    .company-info-title {
        font-size: 1.5em;
        margin-bottom: 16px;
    }
    
    .company-info-text {
        font-size: 1em;
        margin-bottom: 24px;
    }
    
    .company-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .panels-container {
        padding: 16px;
        margin: 16px auto;
        width: calc(100% - 32px);
        max-width: calc(100vw - 32px);
    }
    
    .panels-container .solar-panel {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 16px;
        box-sizing: border-box;
    }
    
    #stacked-panels {
        gap: 32px;
        align-items: center;
        width: 100%;
    }
    
    .solar-panel-content {
        padding: 16px;
        font-size: 12px;
        box-sizing: border-box;
    }
    
    .pixel-toggle-container {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .solar-system-container {
        padding: 0 8px 96px 8px;
        gap: 12px;
    }
    
    .solar-system-frame {
        padding: 8px;
        min-height: 300px;
    }
    
    .company-info-container {
        margin: 24px auto;
        padding: 12px;
        width: calc(100% - 24px);
        max-width: calc(100vw - 24px);
    }
    
    .company-info-content {
        padding: 16px;
    }
    
    .company-info-title {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .company-info-text {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .stat-label {
        font-size: 0.8em;
    }
    
    .panels-container {
        padding: 12px;
        width: calc(100% - 24px);
        max-width: calc(100vw - 24px);
    }
    
    .panels-container .solar-panel {
        padding: 12px;
        box-sizing: border-box;
    }
    
    #stacked-panels {
        gap: 24px;
    }
    
    .solar-panel-content {
        padding: 12px;
        font-size: 11px;
        box-sizing: border-box;
    }
    
    .pixel-label {
        font-size: 9px;
    }
}

/* Mobile-specific header logo constraints */
@media (max-width: 768px) {
    .octopus-logo {
        width: 40px !important;
        max-width: 40px !important;
        height: auto !important;
        max-height: 40px !important;
    }
    
    .header-logo {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        overflow: hidden;
    }
    
    .header-content {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .octopus-logo {
        width: 35px !important;
        max-width: 35px !important;
        height: auto !important;
        max-height: 35px !important;
    }
    
    .header-logo {
        flex-shrink: 0;
        width: 35px;
        height: 35px;
        overflow: hidden;
    }
    
    .header-content {
        gap: 8px;
    }
    
    .header-text h1 {
        font-size: 1.5em;
    }
    
    .header-text h3 {
        font-size: 0.9em;
    }
}

/* Interactive Section Wrapper */
.interactive-section-wrapper {
    width: 100%;
    min-height: 600px; /* Reserve space to prevent layout shifts */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* This is the positioning context */
}
