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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f1a 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Floating Logo */
#floating-logo {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    animation: float 4s ease-in-out infinite;
    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.4))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.2))
        drop-shadow(0 0 40px rgba(0, 245, 212, 0.3));
}

#floating-logo svg {
    display: block;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(1deg);
    }
    50% {
        transform: translateY(-12px) rotate(0deg);
    }
    75% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

#container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Orbiting Navigation */
#orbit-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 550px;
    z-index: 1;
    pointer-events: none;
}

.orbit-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: orbitRotate 20s linear infinite;
}

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

.orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(0, 245, 212, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    pointer-events: all;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    animation: floatItem 3s ease-in-out infinite;
    filter:
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.2))
        drop-shadow(0 0 15px rgba(0, 245, 212, 0.2));
    /* Positioned from center using CSS custom properties */
    top: 50%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    --orbit-x: 0px;
    --orbit-y: 0px;
    transform: translate(var(--orbit-x), var(--orbit-y));
}

@keyframes floatItem {
    0%, 100% {
        filter:
            drop-shadow(0 0 8px rgba(255, 255, 255, 0.2))
            drop-shadow(0 0 15px rgba(0, 245, 212, 0.2));
    }
    50% {
        filter:
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.4))
            drop-shadow(0 0 25px rgba(0, 245, 212, 0.4));
    }
}

.orbit-item svg {
    width: 22px;
    height: 22px;
    /* Counter-rotate to keep icons upright */
    animation: counterRotate 20s linear infinite;
}

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

.orbit-item:hover {
    transform: translate(var(--orbit-x), var(--orbit-y)) scale(1.15);
}

.orbit-item:hover {
    border-color: #00f5d4;
    transform: translate(var(--orbit-x), var(--orbit-y)) scale(1.15);
    filter:
        drop-shadow(0 0 15px rgba(255, 255, 255, 0.5))
        drop-shadow(0 0 30px rgba(0, 245, 212, 0.5));
}

.orbit-item:hover svg {
    color: #00f5d4;
}

/* Label tooltip on hover */
.orbit-item::after {
    content: attr(data-label);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Counter-rotate label */
    animation: counterRotate 20s linear infinite;
}

.orbit-item:hover::after {
    opacity: 1;
}

/* Canvas container for 3D amoeba */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#amoeba-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Brand styling */
#brand {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#brand h1 {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00f5d4, #7b2cbf, #ff6b6b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    text-shadow: 0 0 60px rgba(0, 245, 212, 0.3);
}

#brand .tagline {
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* Content panel that slides up */
#content-panel {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0) 0%,
        rgba(10, 10, 15, 0.95) 10%,
        rgba(10, 10, 15, 1) 20%
    );
    z-index: 10;
    transition: transform 0.1s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 10vh;
    padding-bottom: 10vh;
    /* Hide scrollbar for all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

#content-panel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.content-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.content-inner h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, #00f5d4, #7b2cbf, #ff6b6b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

.content-inner p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-align: justify;
}

/* Scroll indicator */
#scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#scroll-indicator span {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

#scroll-indicator .arrow {
    width: 20px;
    height: 20px;
    margin: 1rem auto 0;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: bounce 2s ease infinite;
}

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

#scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Modal Styles */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: fixed;
    top: 50%;
    width: 65vw;
    height: 50vh;
    background: rgba(10, 10, 20, 0.95);
    border: 2px solid transparent;
    border-radius: 16px;
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease, left 0.4s ease, right 0.4s ease;
    /* Gradient border */
    background-image: linear-gradient(rgba(10, 10, 20, 0.95), rgba(10, 10, 20, 0.95)),
                      linear-gradient(90deg, #00f5d4, #7b2cbf, #ff6b6b);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    /* Allow close button to overflow outside the box */
    overflow: visible;
}

.modal-from-left {
    left: -70vw;
    transform: translateY(-50%);
}

.modal-from-left.active {
    left: 0;
}

.modal-from-right {
    right: -70vw;
    transform: translateY(-50%);
}

.modal-from-right.active {
    right: 0;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-close {
    position: absolute;
    top: -18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(10, 10, 20, 0.95);
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    /* Gradient border matching modal */
    background-image: linear-gradient(rgba(10, 10, 20, 0.95), rgba(10, 10, 20, 0.95)),
                      linear-gradient(90deg, #00f5d4, #7b2cbf, #ff6b6b);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 2px solid transparent;
}

.modal-close:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.modal-close.close-left {
    left: -18px;
}

.modal-close.close-right {
    right: -18px;
}

.modal-content {
    padding: 2rem 3rem;
    height: 100%;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content h2 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-align: center;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.modal-content h3:first-of-type {
    margin-top: 0;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.modal-content p.loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

.gradient-text {
    background: linear-gradient(90deg, #00f5d4, #7b2cbf, #ff6b6b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* Chat Widget */
#chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

#chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f5d4, #7b2cbf);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 245, 212, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 245, 212, 0.6);
}

#chat-bubble svg {
    width: 28px;
    height: 28px;
    color: white;
}

#chat-window {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25vw;
    height: 50vh;
    min-width: 300px;
    min-height: 400px;
    background: rgba(15, 15, 25, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(0, 245, 212, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0) translateY(20px);
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#chat-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

#chat-header {
    padding: 1rem 1.2rem;
    background: linear-gradient(90deg, rgba(0, 245, 212, 0.2), rgba(123, 44, 191, 0.2));
    border-bottom: 1px solid rgba(0, 245, 212, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header span {
    font-weight: 500;
    background: linear-gradient(90deg, #00f5d4, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

#chat-close:hover {
    color: #ff6b6b;
}

#chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#chat-messages::-webkit-scrollbar {
    display: none;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.bot {
    align-self: flex-start;
    background: rgba(0, 245, 212, 0.15);
    border: 1px solid rgba(0, 245, 212, 0.2);
}

.message.user {
    align-self: flex-end;
    background: rgba(123, 44, 191, 0.3);
    border: 1px solid rgba(123, 44, 191, 0.3);
}

.message p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

#chat-input-area {
    padding: 1rem;
    border-top: 1px solid rgba(0, 245, 212, 0.2);
    display: flex;
    gap: 0.8rem;
    background: rgba(10, 10, 15, 0.5);
}

#chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#chat-input:focus {
    border-color: #00f5d4;
    background: rgba(255, 255, 255, 0.1);
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#chat-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f5d4, #7b2cbf);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#chat-send:hover {
    transform: scale(1.05);
}

#chat-send svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    #brand h1 {
        font-size: 2.5rem;
        letter-spacing: 0.2em;
    }

    #brand .tagline {
        font-size: 0.9rem;
        letter-spacing: 0.3em;
    }

    .content-inner h2 {
        font-size: 1.8rem;
    }

    .content-inner p {
        font-size: 1rem;
    }

    #chat-window {
        width: 90vw;
        height: 60vh;
        min-width: unset;
        right: -1rem;
    }

    #chat-widget {
        bottom: 1rem;
        right: 1rem;
    }

    #chat-bubble {
        width: 50px;
        height: 50px;
    }

    #chat-bubble svg {
        width: 24px;
        height: 24px;
    }

    .modal {
        width: 95vw;
        height: 60vh;
    }

    .modal-from-left {
        left: -100vw;
    }

    .modal-from-right {
        right: -100vw;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.8rem;
    }
}
