/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #4299e1;
    --text-color: #ffffff;
    --text-secondary: #a8b2d1;
    --wave-color: rgba(66, 153, 225, 0.2);
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Container */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Background Image */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png'); /* Ganti dengan gambar Anda */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -3;
}

/* Overlay for better text readability */
.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.8) 0%, rgba(44, 82, 130, 0.7) 100%);
    z-index: -1;
}

/* Clouds Container */
.clouds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.4;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud1 {
    width: 180px;
    height: 70px;
    top: 20%;
    animation: float-cloud 30s infinite;
}

.cloud1::before {
    width: 90px;
    height: 90px;
    top: -45px;
    left: 18px;
}

.cloud1::after {
    width: 110px;
    height: 70px;
    top: -27px;
    right: 18px;
}

.cloud2 {
    width: 150px;
    height: 65px;
    top: 40%;
    animation: float-cloud 25s infinite;
    animation-delay: -5s;
}

.cloud2::before {
    width: 75px;
    height: 75px;
    top: -37px;
    left: 28px;
}

.cloud2::after {
    width: 90px;
    height: 65px;
    top: -18px;
    right: 28px;
}

.cloud3 {
    width: 200px;
    height: 80px;
    top: 15%;
    animation: float-cloud 35s infinite;
    animation-delay: -10s;
}

.cloud3::before {
    width: 100px;
    height: 100px;
    top: -50px;
    left: 40px;
}

.cloud3::after {
    width: 120px;
    height: 80px;
    top: -27px;
    right: 40px;
}

.cloud4 {
    width: 160px;
    height: 70px;
    top: 35%;
    animation: float-cloud 28s infinite;
    animation-delay: -15s;
}

.cloud4::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 32px;
}

.cloud4::after {
    width: 100px;
    height: 70px;
    top: -21px;
    right: 32px;
}

.cloud5 {
    width: 190px;
    height: 75px;
    top: 25%;
    animation: float-cloud 32s infinite;
    animation-delay: -20s;
}

.cloud5::before {
    width: 95px;
    height: 95px;
    top: -47px;
    left: 38px;
}

.cloud5::after {
    width: 115px;
    height: 75px;
    top: -24px;
    right: 38px;
}

@keyframes float-cloud {
    0% {
        transform: translateX(-200px);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* Wave Canvas (positioned lower) */
#waveCanvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh; /* Reduced height to position waves lower */
    z-index: -1;
    opacity: 0.8;
}

/* Header */
.header {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #c3dbea;
    text-shadow: 0 0 20px rgba(195, 219, 234, 0.3);
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Content Left */
.content-left {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Content Right */
.content-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Message container */
.message-container {
    margin-bottom: 2rem;
}

/* Image Container */
.image-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    overflow: visible;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.rocket-character {
    animation: fly-rocket 4s ease-in-out infinite;
}

@keyframes fly-rocket {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-1deg);
    }
    50% {
        transform: translateY(-15px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.robot-character {
    position: absolute;
    top: 221px;
    right: 20px;
    width: 120px;
    height: auto;
    z-index: 2;
    animation: robot-float 3s ease-in-out infinite;
}

@keyframes robot-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.8) 0%, rgba(66, 153, 225, 0.6) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}


.overlay-text {
    text-align: center;
    color: white;
    padding: 2rem;
}

.overlay-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.overlay-text p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}


.main-message {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.word.revealed {
    opacity: 1;
    transform: translateY(0);
}

.sub-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1.5s;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.sub-message.revealed {
    opacity: 1;
    transform: translateY(0);
}

.revamp-message {
    font-size: 1rem;
    color: var(--accent-color);
    max-width: 600px;
    margin: 1rem auto 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 2s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.revamp-message.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Container */
.progress-container {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #63f3ab);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.progress-text.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .content-left {
        text-align: center;
        order: 2;
    }
    
    .content-right {
        order: 1;
    }
    
    .image-container {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .rocket-character {
        max-width: 80%;
        height: auto;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 1.5rem;
    }
    
    #waveCanvas {
        height: 30vh;
    }
    
    .cloud {
        transform: scale(0.8);
    }
    
    .flying-robot {
        width: 150px;
        height: 90px;
        top: 12%;
    }
    
    .robot-image {
        width: 60px;
    }
    
    .rocket-small {
        width: 75px;
    }
    
    .robot-character {
        width: 90px;
        bottom: -15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .main-message {
        font-size: 1.8rem;
    }
    
    .sub-message {
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-grid {
        gap: 1.5rem;
    }
    
    .image-container {
        max-width: 300px;
    }
    
    .rocket-character {
        max-width: 60%;
        height: auto;
    }
    
    .overlay-icon {
        font-size: 2rem;
    }
    
    .overlay-text p {
        font-size: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .footer {
        padding: 1rem;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    #waveCanvas {
        height: 25vh;
    }
    
    .cloud {
        transform: scale(0.6);
    }
    
    .flying-robot {
        width: 60px;
        height: 60px;
        top: 10%;
    }
    
    .robot-character {
        width: 70px;
        bottom: -10px;
        right: 10px;
    }
}

/* Additional mobile optimizations */
@media (max-height: 700px) {
    .main-content {
        justify-content: center;
        min-height: 80vh;
    }
    
    .message-container {
        margin-bottom: 1.5rem;
    }
    
    #waveCanvas {
        height: 20vh;
    }
}