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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #202124 url('/background.png') center/cover no-repeat;
    height: 100vh;
    overflow: hidden; /* No scrollbar */
    color: #ffffff;
    font-size: clamp(14px, 1.5vh, 18px); /* Scale with height */
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
}

.maintenance-container {
    position: relative;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(10px, 3vh, 40px);
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

.shape-1 {
    width: clamp(60px, 8vw, 80px);
    height: clamp(60px, 8vw, 80px);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: clamp(80px, 12vw, 120px);
    height: clamp(80px, 12vw, 120px);
    top: 70%;
    left: 80%;
    animation-delay: 2s;
}

.shape-3 {
    width: clamp(40px, 6vw, 60px);
    height: clamp(40px, 6vw, 60px);
    top: 40%;
    left: 90%;
    animation-delay: 4s;
}

.shape-4 {
    width: clamp(70px, 10vw, 100px);
    height: clamp(70px, 10vw, 100px);
    top: 80%;
    left: 20%;
    animation-delay: 6s;
}

.shape-5 {
    width: clamp(100px, 14vw, 140px);
    height: clamp(100px, 14vw, 140px);
    top: 20%;
    left: 70%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.5;
    }
}

/* Content */
.content {
    text-align: center;
    max-width: min(85vw, 600px);
    width: 100%;
    z-index: 10;
    position: relative;
    padding: clamp(10px, 2vh, 30px);
    margin-top: 0;
}

/* Logo Section */
.logo-section {
    margin-bottom: clamp(10px, 3vh, 30px);
}

.logo-icon {
    display: inline-block;
    margin-bottom: clamp(5px, 2vh, 15px);
}

.logo-icon i {
    font-size: clamp(24px, 5vh, 40px);
    color: #ffffff;
    animation: spin 3s linear infinite;
}

.brand-name {
    font-size: clamp(18px, 3vh, 26px);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* Maintenance Icon */
.maintenance-icon {
    margin-bottom: clamp(15px, 4vh, 35px);
}

.icon-wrapper {
    position: relative;
    display: inline-block;
}

.icon-wrapper svg {
    width: clamp(50px, 10vh, 80px);
    height: clamp(50px, 10vh, 80px);
    color: #ffffff;
    filter: drop-shadow(0 0 20px rgba(255, 154, 61, 0.3));
    animation: pulse 2s infinite;
}

.spinning-icon {
    animation: spin 4s linear infinite;
    color: rgba(255, 255, 255, 0.9);
}

.sparks {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(80px, 15vw, 120px);
    height: clamp(80px, 15vw, 120px);
}

.spark {
    position: absolute;
    width: clamp(3px, 0.5vw, 4px);
    height: clamp(3px, 0.5vw, 4px);
    background: #ffffff;
    border-radius: 50%;
    animation: sparkle 1.5s infinite;
    box-shadow: 0 0 10px #ffffff;
}

.spark:nth-child(1) {
    top: 0;
    left: 50%;
    animation-delay: 0s;
}

.spark:nth-child(2) {
    top: 50%;
    right: 0;
    animation-delay: 0.5s;
}

.spark:nth-child(3) {
    bottom: 0;
    left: 50%;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Message Section */
.message-section {
    margin-bottom: clamp(15px, 4vh, 30px);
}

.main-title {
    font-size: clamp(24px, 5vh, 48px);
    font-weight: 700;
    margin-bottom: clamp(5px, 2vh, 15px);
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(12px, 2vh, 16px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin: 0 auto;
    max-width: min(90vw, 600px);
}

/* Progress Section */
.progress-section {
    margin-bottom: clamp(15px, 3vh, 30px);
}

.progress-container {
    max-width: min(90vw, 400px);
    margin: 0 auto;
    padding: 0 clamp(10px, 2vw, 20px);
}

.progress-bar {
    width: 100%;
    height: clamp(6px, 1vh, 8px);
    background: rgba(255, 255, 255, 0.3);
    border-radius: clamp(3px, 0.5vh, 4px);
    overflow: hidden;
    margin-bottom: clamp(5px, 1vh, 10px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #00ff88 100%);
    border-radius: clamp(3px, 0.5vh, 4px);
    width: 0%;
    transition: width 0.5s linear;
}

.progress-text {
    font-size: clamp(10px, 1.5vh, 14px);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
}

/* Countdown Timer */
.countdown-section {
    margin-bottom: clamp(15px, 4vh, 30px);
}

.countdown-title {
    font-size: clamp(12px, 2vh, 16px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: clamp(10px, 2vh, 15px);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 2vw, 30px);
    flex-wrap: nowrap;
    margin: 0 auto;
}

.time-unit {
    text-align: center;
    min-width: clamp(50px, 8vw, 100px);
}

.time-unit .number {
    display: block;
    font-size: clamp(24px, 4vh, 40px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: clamp(5px, 1vw, 8px);
}

.time-unit .label {
    font-size: clamp(10px, 1.5vw, 12px);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-separator {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

/* Back to Home Button */
.home-button-section {
    text-align: center;
    padding-top: clamp(20px, 4vw, 30px);
    margin-top: clamp(15px, 3vw, 20px);
    position: relative;
    z-index: 20;
}

.home-btn {
     background: rgba(255, 255, 255, 0.1);
     border: 1px solid rgba(255, 255, 255, 0.3);
     color: #ffffff;
     padding: 12px 24px;
     border-radius: 25px;
     font-size: clamp(14px, 1.8vw, 16px);
     font-weight: 500;
     cursor: pointer;
     transition: all 0.3s ease;
     display: inline-flex;
     align-items: center;
     gap: 10px;
     text-decoration: none;
     position: relative;
     z-index: 21;
     pointer-events: auto;
 }

.home-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.home-btn i {
    font-size: clamp(16px, 2vw, 18px);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s both;
}

.bounce-in {
    animation: bounceIn 1s ease-out 0.2s both;
}

.slide-up {
    animation: slideUp 1s ease-out 0.4s both;
}

.slide-up-delay {
    animation: slideUp 1s ease-out 0.7s both;
}

.slide-up-delay-2 {
    animation: slideUp 1s ease-out 1s both;
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .maintenance-container {
        padding: clamp(15px, 3vw, 30px) clamp(10px, 2vw, 15px);
    }
    
    .content {
        padding: clamp(12px, 2vw, 16px);
    }
    
    .countdown-timer {
        gap: clamp(8px, 1.5vw, 15px);
    }
    
    .time-unit {
        min-width: clamp(50px, 7vw, 70px);
    }
    
    .shape {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .maintenance-container {
        padding: clamp(10px, 2vw, 15px);
    }
    
    .content {
        padding: clamp(8px, 1.5vw, 12px);
    }
    
    .countdown-timer {
        gap: clamp(5px, 1vw, 8px);
    }
    
    .time-unit {
        min-width: clamp(40px, 6vw, 60px);
    }
    
    .time-unit .number {
        font-size: clamp(18px, 4vw, 24px);
    }
    
    .time-unit .label {
        font-size: clamp(9px, 1.2vw, 11px);
    }
    
    .time-separator {
        font-size: clamp(16px, 3vw, 20px);
    }
    
    .icon-wrapper svg {
        width: clamp(50px, 8vw, 60px);
        height: clamp(50px, 8vw, 60px);
    }
    
    .shape {
        transform: scale(0.6);
    }
    
    .sparks {
        width: clamp(80px, 15vw, 100px);
        height: clamp(80px, 15vw, 100px);
    }
}

@media (max-width: 360px) {
    .maintenance-container {
        padding: clamp(8px, 1.5vh, 12px);
    }
    
    .countdown-timer {
        /* Keep row but scale down */
        flex-direction: row;
        gap: clamp(5px, 1vw, 8px);
        flex-wrap: nowrap;
    }
    
    .time-unit {
        min-width: clamp(40px, 10vw, 50px);
    }
    
    .time-unit .number {
        font-size: clamp(16px, 3vh, 20px);
    }

    .time-unit .label {
        font-size: 9px;
    }
    
    .time-separator {
        font-size: 14px;
        margin: 0 2px;
    }
    
    .content {
        max-width: 100%;
        padding: 5px;
    }

    .main-title {
        font-size: clamp(20px, 4vh, 28px);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(30, 30, 30, 0.8) 100%), url('/background.png') center/cover no-repeat;
    }
    
    .shape {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .social-link {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .social-link:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Desktop optimization - Height aware */
@media (min-width: 1200px) and (min-height: 800px) {
    .maintenance-container {
        max-width: 1400px;
    }
    
    .content {
        max-width: 700px;
        padding: clamp(30px, 4vh, 50px);
    }
    
    .main-title {
        font-size: clamp(36px, 5vh, 60px);
        margin-bottom: clamp(20px, 3vh, 30px);
    }
    
    .subtitle {
        font-size: clamp(16px, 2vh, 20px);
    }
    
    .countdown-timer {
        gap: clamp(25px, 3vw, 40px);
    }
    
    .time-unit {
        min-width: clamp(90px, 8vw, 120px);
    }
    
    .time-unit .number {
        font-size: clamp(36px, 5vh, 56px);
        margin-bottom: clamp(8px, 1.5vh, 12px);
    }
    
    .time-unit .label {
        font-size: clamp(12px, 1.5vh, 16px);
    }
    
    .icon-wrapper svg {
        width: clamp(70px, 8vh, 100px);
        height: clamp(70px, 8vh, 100px);
    }
}

/* Landscape Mode / Short Screens */
@media (max-height: 600px) {
    .maintenance-container {
        padding: 10px;
    }
    
    .content {
        padding: 5px;
    }
    
    .logo-section {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .logo-icon {
        margin-bottom: 0;
    }
    
    .logo-icon i {
        font-size: 24px;
    }
    
    .brand-name {
        font-size: 18px;
    }
    
    .maintenance-icon {
        margin-bottom: 10px;
        display: none; /* Hide icon to save space on very short screens */
    }
    
    .message-section {
        margin-bottom: 10px;
    }
    
    .main-title {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 12px;
        display: none; /* Hide subtitle if needed or keep small */
    }
    
    .progress-section {
        margin-bottom: 10px;
    }
    
    .countdown-section {
        margin-bottom: 10px;
    }
    
    .countdown-timer {
        gap: 15px;
    }
    
    .time-unit .number {
        font-size: 20px;
    }
    
    .time-unit .label {
        font-size: 10px;
    }
    
    .icon-wrapper svg {
        width: 40px;
        height: 40px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .subtitle,
    .contact-text,
    .progress-text,
    .contact-link,
    .footer p {
        color: #ffffff;
    }
    
    .social-link {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-shapes {
        display: none;
    }
}

/* Autofit utilities */
.autofit-container {
    container-type: inline-size;
    container-name: maintenance;
}

@container maintenance (max-width: 400px) {
    .countdown-timer {
        flex-direction: row;
        gap: clamp(5px, 2vw, 10px);
        flex-wrap: nowrap;
    }
    
    .time-separator {
        display: block;
        font-size: clamp(14px, 3vw, 18px);
        margin: 0 2px;
    }
}

/* Fluid typography */
.fluid-text {
    font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem);
}

/* Responsive spacing */
.responsive-margin {
    margin: clamp(1rem, 3vw, 2rem);
}

.responsive-padding {
    padding: clamp(0.5rem, 2vw, 1.5rem);
}

/* Flexibel sizing utilities */
.flex-size-sm {
    width: clamp(2rem, 4vw, 3rem);
    height: clamp(2rem, 4vw, 3rem);
}

.flex-size-md {
    width: clamp(3rem, 6vw, 4rem);
    height: clamp(3rem, 6vw, 4rem);
}

.flex-size-lg {
    width: clamp(4rem, 8vw, 6rem);
    height: clamp(4rem, 8vw, 6rem);
}

/* Auto-fit grid */
.auto-fit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
}

/* Responsive flex */
.responsive-flex {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
    justify-content: center;
    align-items: center;
}

body.browser-error-mode {
    margin: 0;
    background: #f2f2f2;
    color: #202124;
    font-family: Arial, sans-serif;
    display: block;
    height: 100vh;
}

.browser-error-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 140px 24px 24px;
}

.browser-error-card {
    width: min(100%, 480px);
}

.browser-error-icon {
    width: 64px;
    height: 64px;
    color: #5f6368;
    margin-bottom: 20px;
}

.browser-error-title {
    margin: 0 0 16px;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.25;
    color: #202124;
}

.browser-error-text {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.6;
    color: #5f6368;
}

.browser-error-text strong {
    font-weight: 500;
    color: #202124;
}

.browser-error-code {
    margin: 0;
    font-size: 14px;
    color: #5f6368;
}
