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

:root {
    --primary-blue: #2196F3;
    --primary-blue-dark: #1976D2;
    --primary-blue-light: #42A5F5;
    --secondary-blue: #03A9F4;
    --accent-blue: #00BCD4;
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --text-dark: #263238;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--gradient-primary);
    color: var(--white);
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 15s infinite ease-in-out;
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation-delay: -5s;
}

.circle:nth-child(3) {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: 30%;
    animation-delay: -10s;
}

.circle:nth-child(4) {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 20%;
    animation-delay: -7s;
}

.circle:nth-child(5) {
    width: 250px;
    height: 250px;
    bottom: 10%;
    left: -80px;
    animation-delay: -3s;
}

@keyframes float {

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

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* Header with Logo */
.maintenance-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 20px 30px;
}

.maintenance-header .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.maintenance-header .logo-container img {
    width: 70px;
    height: 70px;
    filter: none;
    animation: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

/* Ship Label - follows the ship */
.ship-label {
    position: fixed;
    z-index: 50;
    text-align: center;
    pointer-events: none;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    transition: opacity 0.3s ease;
    font-family: 'Press Start 2P', cursive;
    opacity: 0;
    visibility: hidden;
}

.ship-label.visible {
    opacity: 1;
    visibility: visible;
}

.ship-label h1 {
    font-size: 0.85rem;
    font-weight: 400;
    color: #00FFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.4), 2px 2px 0 #006666;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    border-right: 3px solid #00FFFF;
    white-space: nowrap;
    width: 0;
}

.ship-label p {
    font-size: 0.45rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 1px 1px 0 #003333;
    line-height: 1.6;
    letter-spacing: 0px;
    opacity: 0;
}

/* Typewriter effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

@keyframes hideCaret {
    to {
        border-color: transparent;
    }
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 255, 255, 1), 0 0 50px rgba(0, 255, 255, 0.6);
    }
}

/* Main Content */
.maintenance-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Logo */
.logo-container {
    margin-bottom: 2rem;
}

.logo-container img {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Gear Animation */
.gear-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 10px;
}

.gear {
    fill: rgba(255, 255, 255, 0.9);
}

.gear-large {
    width: 80px;
    height: 80px;
    animation: rotateCW 4s linear infinite;
}

.gear-small {
    width: 50px;
    height: 50px;
    animation: rotateCCW 3s linear infinite;
}

@keyframes rotateCW {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateCCW {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Text Content */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Progress Bar */
.progress-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background: var(--white);
    border-radius: 50px;
    width: 0%;
    animation: progress 3s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.progress-text {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Info Cards */
.info-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    min-width: 150px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.info-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.info-card-value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
    z-index: 100;
}

.footer br {
    display: none;
}

@media (max-width: 768px) {
    .footer br {
        display: block;
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .gear-large {
        width: 60px;
        height: 60px;
    }

    .gear-small {
        width: 40px;
        height: 40px;
    }

    .info-cards {
        flex-direction: column;
        align-items: center;
    }

    .info-card {
        width: 100%;
        max-width: 200px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* Countdown Timer */
.countdown {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

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

.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    display: block;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 12px;
    min-width: 70px;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 0.5rem;
    display: block;
}

@media (max-width: 480px) {
    .countdown {
        gap: 0.75rem;
    }

    .countdown-value {
        font-size: 1.5rem;
        padding: 0.75rem;
        min-width: 50px;
    }

    .countdown-label {
        font-size: 0.6rem;
    }
}

/* Three.js Game Container */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--gradient-primary);
}

#particles-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Control Buttons */
.control-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 12px;
    flex-direction: row;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

/* Wireframe Button Specific */
#wireframe-btn {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.3);
    color: #00FFFF;
}

#wireframe-btn:hover {
    background: rgba(0, 255, 255, 0.25);
    border-color: rgba(0, 255, 255, 0.5);
}

#wireframe-btn.wireframe-mode {
    background: rgba(255, 0, 255, 0.2);
    border-color: rgba(255, 0, 255, 0.5);
    color: #FF00FF;
}

/* Fullscreen Button Specific */
#fullscreen-btn {
    background: rgba(0, 255, 128, 0.15);
    border-color: rgba(0, 255, 128, 0.3);
    color: #00FF80;
}

#fullscreen-btn:hover {
    background: rgba(0, 255, 128, 0.25);
    border-color: rgba(0, 255, 128, 0.5);
}

/* Game Hint */
.game-hint {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .maintenance-header {
        padding: 15px 20px;
    }
    
    .maintenance-header .logo-container img {
        width: 55px;
        height: 55px;
    }
    
    .logo-name {
        font-size: 1.3rem;
    }
    
    .logo-tagline {
        font-size: 0.7rem;
    }
    
    .control-buttons {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    
    .control-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .ship-label h1 {
        font-size: 0.65rem;
        letter-spacing: 0px;
    }
    
    .ship-label p {
        font-size: 0.35rem;
    }
    
    .game-hint {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .maintenance-header {
        padding: 10px 15px;
    }
    
    .maintenance-header .logo-container img {
        width: 35px;
        height: 35px;
    }
    
    .logo-name {
        font-size: 1rem;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .ship-label h1 {
        font-size: 0.5rem;
        letter-spacing: 0px;
    }
    
    .ship-label p {
        font-size: 0.3rem;
    }
}