body {
    margin: 0;
    padding: 0;
    min-height: 60vh;
    background: linear-gradient(135deg, #1e1b4b, #2a1a5e, #3b5998);
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Make success page static */
body.success-page {
    height: 100vh;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
    animation: twinkle 4s infinite ease-in-out;
}

@keyframes twinkle {
    0% { opacity: 1.0; }
    50% { opacity: 0.3; }
    100% { opacity: 1.0; }
}

.falling-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.falling-star {
    position: absolute;
    height: 4px;
    background: linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
    animation: tail var(--duration) ease-in-out forwards, falling var(--duration) ease-in-out forwards;
}

.falling-star::before, .falling-star::after {
    content: '';
    position: absolute;
    top: calc(50% - 2px);
    right: 0;
    height: 4px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), #ffffff, rgba(255, 255, 255, 0));
    border-radius: 100%;
    transform: translateX(50%) rotateZ(45deg);
    animation: shining var(--duration) ease-in-out forwards;
}

.falling-star::after {
    transform: translateX(50%) rotateZ(-45deg);
}

@keyframes tail {
    0% { width: 0; }
    30% { width: 100px; }
    100% { width: 0; }
}

@keyframes shining {
    0% { width: 0; }
    50% { width: 30px; }
    100% { width: 0; }
}

@keyframes falling {
    0% { transform: translateX(0); }
    100% { transform: translateX(300px); }
}

body::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 80%;
    width: 100px;
    height: 100px;
    background: url('../assets/moon.png') no-repeat center center;
    background-size: contain;
    z-index: -1;
}

.navbar {
    background: linear-gradient(90deg, #2a1a5e, #3b5998);
    padding: 15px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 20px auto;
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
}

.logo a {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: #e0e0ff;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #ffffff;
}

.try-button {
    background: linear-gradient(90deg, #4a69bd, #ffffff);
    color: #1e1b4b;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.3s ease;
    margin-left: auto;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
    100% { filter: brightness(1); }
}

.try-button:hover {
    filter: brightness(1.3);
    transform: scale(1.1);
}

main {
    text-align: center;
    padding: 150px 50px 50px;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    color: #e0e0ff;
    margin: 0;
}

.title-main {
    display: block;
}

.title-sub {
    display: block;
    font-size: 28px;
    margin-top: 10px;
}

.chat-window {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.9), rgba(59, 89, 152, 0.9));
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    height: 300px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
}

.chat-window::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 1px;
    background: #ffffff;
}

.messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 10px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 10px;
    position: relative;
}

.user-message {
    background: #3b5998;
    align-self: flex-end;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease, border 0.5s ease;
}

.user-message.visible {
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bot-message {
    background: #2a1a5e;
    align-self: flex-start;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease, border 0.5s ease;
}

.bot-message.visible {
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-text {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.message-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    align-self: flex-end;
    margin-top: 5px;
}

.input-container {
    display: flex;
    margin-top: 10px;
}

.input-field {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(30, 27, 75, 0.9);
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
}

/* Custom Scrollbar for chat window */
.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track {
    background: rgba(30, 27, 75, 0.8);
    border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b5998, #2a1a5e);
    border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a69bd, #3b5998);
}

/* Custom Scrollbar for page */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 27, 75, 0.8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b5998, #2a1a5e);
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a69bd, #3b5998);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    body::after {
        width: 60px;
        height: 60px;
        top: 10%;
        left: 85%;
    }

    .navbar {
        padding: 10px 15px;
        width: 95%;
        margin: 10px auto;
    }

    .logo a {
        font-size: 18px;
    }

    .try-button {
        font-size: 12px;
        padding: 8px 15px;
    }

    main {
        padding: 100px 20px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .title-sub {
        font-size: 18px;
    }

    .chat-window {
        width: 95%;
        max-width: 400px;
        height: 250px;
        padding: 15px;
        margin: 20px auto;
    }

    .message-text {
        font-size: 14px;
    }

    .message-time {
        font-size: 10px;
    }

    .input-field {
        font-size: 12px;
        padding: 8px;
    }

    .messages::-webkit-scrollbar {
        width: 6px;
    }

    ::-webkit-scrollbar {
        width: 8px;
    }
}