* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    height: 100%;
    overflow: hidden;
}

/* Loading Animation */
.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 249, 249, 0.95);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.loading-animation.visible {
    opacity: 1;
    pointer-events: all;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #93785B, #AC8968);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: pulse 1.5s ease-in-out infinite;
    overflow: hidden;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.loader-text {
    font-size: 1.1rem;
    color: #365D36;
    font-weight: 500;
}

/* Index Page (will be pulled away) */
.index-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform-origin: bottom left;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85; /* Optimized for clarity */
    transition: opacity 0.5s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Darker overlay for better text contrast */
    transition: background 0.5s ease;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    color: white; /* Changed to white */
    padding: 20px;
    transition: color 0.5s ease;
    position: relative;
    z-index: 2;
}

.logo {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
    animation: bounce 2s infinite alternate;
    border-radius: 50%;
    background: linear-gradient(135deg, #93785B, #AC8968);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: background 0.5s ease;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-30px);
    }
}

.company-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); /* Darker shadow for white text */
    opacity: 0;
    animation: fadeIn 1s 0.5s forwards;
    font-weight: 500;
    letter-spacing: 1px;
    color: white; /* Changed to white */
    transition: color 0.5s ease;
}

.title-container {
    margin-bottom: 20px;
    height: 80px;
    overflow: hidden;
    position: relative;
}

.title-word {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Darker shadow for white text */
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(100px);
    color: white; /* Changed to white */
    transition: color 0.5s ease;
}

.title-word.active {
    animation: slideUpBounce 1.2s forwards;
}

@keyframes slideUpBounce {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    70% {
        transform: translateY(-10px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); /* Darker shadow for white text */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s 1.5s forwards;
    color: white; /* Changed to white */
    transition: color 0.5s ease;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    position: relative;
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: linear-gradient(45deg, #365D36, #93785B);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1s 2s forwards;
    cursor: pointer;
    border: none;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #93785B, #365D36);
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #AC8968, #A69080);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover:before {
    opacity: 1;
}

.wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transform: scale(0);
    animation: wave 2s infinite;
    z-index: -2;
}

@keyframes wave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Language selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white; /* Changed to white */
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.6); /* Darker background for contrast */
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: color 0.5s ease;
    z-index: 10;
}

.language-selector select {
    background: transparent;
    border: none;
    padding: 5px;
    border-radius: 5px;
    color: white; /* Changed to white */
    cursor: pointer;
    outline: none;
    font-weight: 500;
    transition: color 0.5s ease;
}

.language-selector select option {
    color: #333;
    background: white;
}

/* Color palette selector */
.color-selector {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 10;
}

.color-selector h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-size: 1.1rem;
}

.preset-palettes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.palette-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.palette-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.palette-option.active {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.palette-colors {
    display: flex;
    height: 20px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.palette-color {
    flex: 1;
}

.palette-name {
    font-size: 0.7rem;
    color: #333;
}

.custom-colors {
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
}

.custom-colors h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #333;
}

.color-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.color-input {
    display: flex;
    flex-direction: column;
}

.color-input label {
    font-size: 0.7rem;
    margin-bottom: 5px;
    color: #333;
}

.color-input input {
    width: 100%;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.apply-custom {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: #365D36;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.apply-custom:hover {
    background: #2a472a;
}

.toggle-palette {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 11;
}

.toggle-palette i {
    color: #333;
    font-size: 1.2rem;
}

/* Paper Plane Animation */
.paper-plane-container {
    position: fixed;
    bottom: -100px;
    left: -100px;
    width: 100px;
    height: 100px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.paper-plane {
    width: 100%;
    height: 100%;
    color: #365D36;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.3));
    transform: rotate(-45deg);
}

.paper-plane i {
    font-size: 100px;
}

.plane-animate {
    animation: flyAway 2s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes flyAway {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(-45deg) scale(1);
    }
    30% {
        opacity: 1;
        transform: translate(40vw, -40vh) rotate(-45deg) scale(1.1);
    }
    60% {
        opacity: 1;
        transform: translate(80vw, -80vh) rotate(-45deg) scale(1.2);
    }
    80% {
        opacity: 0.7;
        transform: translate(110vw, -110vh) rotate(-45deg) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(140vw, -140vh) rotate(-45deg) scale(0.8);
    }
}

/* Page Pull Animation */
.page-pull {
    animation: pagePull 2s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pagePull {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    30% {
        transform: translate(40vw, -40vh) rotate(-8deg) scale(0.92);
        opacity: 0.85;
    }
    60% {
        transform: translate(80vw, -80vh) rotate(-16deg) scale(0.84);
        opacity: 0.7;
    }
    80% {
        transform: translate(110vw, -110vh) rotate(-22deg) scale(0.76);
        opacity: 0.5;
    }
    100% {
        transform: translate(140vw, -140vh) rotate(-28deg) scale(0.68);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 1024px) {
    .title-word {
        font-size: 3rem;
    }
    
    .logo {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .title-word {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .logo {
        width: 140px;
        height: 140px;
    }
    
    .company-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
    
    .color-selector {
        width: 280px;
        left: 10px;
        bottom: 10px;
    }
    
    .language-selector {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
    }
    
    .toggle-palette {
        bottom: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
    }
    
    .paper-plane-container {
        width: 80px;
        height: 80px;
        bottom: -80px;
        left: -80px;
    }
    
    .paper-plane i {
        font-size: 80px;
    }
    
    .loader-logo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .title-word {
        font-size: 2rem;
    }
    
    .title-container {
        height: 60px;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .logo {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
    
    .company-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .color-selector {
        width: 260px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 70px;
    }
    
    .preset-palettes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
        font-size: 0.9rem;
    }
    
    .paper-plane-container {
        width: 60px;
        height: 60px;
        bottom: -60px;
        left: -60px;
    }
    
    .paper-plane i {
        font-size: 60px;
    }
    
    .loader-logo {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .title-word {
        font-size: 1.8rem;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .color-selector {
        width: 240px;
    }
    
    .preset-palettes {
        grid-template-columns: 1fr;
    }
}