* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(145deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow-x: hidden;
}


/* ===== 3D SPACE BACKGROUND ===== */

#space-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#space-canvas {
    width: 100%;
    height: 100%;
    display: block;
}


/* Animated background orbs */

body::before {
    content: "";
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, rgba(139, 92, 246, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: floatOrb 20s ease-in-out infinite;
}

body::after {
    content: "";
    position: fixed;
    bottom: -15%;
    right: -5%;
    width: 55%;
    height: 55%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: floatOrb2 25s ease-in-out infinite;
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 20px);
    }
}

@keyframes floatOrb2 {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-20px, -30px);
    }
}


/* Header Styles */

.site-header {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 2rem auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border-radius: 80px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
    transition: all 0.3s ease;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #c4b5fd, #f0b6d0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.logo-tagline {
    font-size: 0.65rem;
    color: #a78bfa;
    opacity: 0.8;
    margin-top: -2px;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #e0d4ff;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #ec489a);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}


/* Hero Card */

.hero-card {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border-radius: 2.5rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.2);
    padding: 2.8rem 2.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 10;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card:hover {
    box-shadow: 0 30px 55px -15px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #c4b5fd, #f0b6d0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.2rem;
    }
}

footer {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    color: #cbd5e1;
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.2rem 1.8rem;
    border-radius: 1.5rem;
    margin: 1.5rem 0 2rem 0;
    border-left: 4px solid #8b5cf6;
    text-align: center;
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2.5rem 0 1.5rem;
}

.btn {
    flex: 1;
    min-width: 220px;
    transition: transform 0.25s ease;
}

.btn a {
    text-decoration: none;
    display: block;
}

button {
    width: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 1rem 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 60px;
    color: #e0d4ff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

.btn:first-child button::before {
    content: "✨";
    position: static;
    background: none;
    font-size: 1.2rem;
    margin-right: 8px;
}

.btn:nth-child(2) button::before {
    content: "🏛️";
    position: static;
    background: none;
    font-size: 1.2rem;
    margin-right: 8px;
}

.btn:nth-child(3) button::before {
    content: "📚";
    position: static;
    background: none;
    font-size: 1.2rem;
    margin-right: 8px;
}

.btn:first-child button::before,
.btn:nth-child(2) button::before,
.btn:nth-child(3) button::before {
    display: inline-block;
}

button:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.35));
    border-color: rgba(139, 92, 246, 0.7);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -8px rgba(139, 92, 246, 0.4);
    color: #ffffff;
}

button:active {
    transform: translateY(1px);
}

.contact-info {
    margin-top: 2.5rem;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding-top: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-info a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.15);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #c4b5fd;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.contact-info a:hover {
    background: rgba(139, 92, 246, 0.3);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.6);
}

.contact-info a::before {
    content: "📞";
    font-size: 1rem;
}

.contact-info span {
    color: #94a3b8;
    font-weight: 500;
}

.contact-info span::before {
    content: "✉️ ";
}


/* ===== CHAT BUTTON ===== */

.chat-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.chat-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border: none;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 2s infinite alternate;
    position: relative;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    }
    100% {
        box-shadow: 0 12px 48px rgba(139, 92, 246, 0.7);
    }
}

.chat-toggle:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 12px 48px rgba(139, 92, 246, 0.7);
}

.chat-toggle .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.chat-window {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.8rem;
    width: 380px;
    max-width: 92vw;
    height: 520px;
    max-height: 75vh;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-window.open {
    display: flex;
}

.chat-header {
    padding: 0.8rem 1.2rem;
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header h3 {
    color: #e0d4ff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.chat-header h3 .online-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.chat-close {
    background: none;
    border: none;
    color: #8a6e9e;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.2s;
    padding: 0 0.3rem;
    line-height: 1;
}

.chat-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    padding: 1rem 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-messages .msg {
    max-width: 88%;
    padding: 0.6rem 1rem;
    border-radius: 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: msgIn 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@keyframes msgIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-messages .msg.bot {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-messages .msg.user {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-messages .msg.system {
    background: rgba(251, 191, 36, 0.1);
    color: #fef3c7;
    align-self: center;
    text-align: center;
    font-size: 0.78rem;
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    max-width: 95%;
}

.chat-footer {
    padding: 0.6rem 1rem 0.8rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    background: rgba(15, 12, 41, 0.5);
}

.chat-footer input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #e0d4ff;
    font-size: 0.9rem;
    outline: none;
    min-width: 100px;
    transition: 0.2s;
}

.chat-footer input::placeholder {
    color: rgba(200, 180, 220, 0.4);
}

.chat-footer input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.chat-footer .send-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.chat-footer .send-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.chat-footer .send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.8rem;
    flex: 1;
    text-align: center;
}

.auth-overlay.show {
    display: flex;
}

.auth-overlay .auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
}

.auth-overlay h4 {
    color: #e0d4ff;
    font-size: 1.1rem;
}

.auth-overlay p {
    color: #8a6e9e;
    font-size: 0.9rem;
    max-width: 260px;
}

.auth-btns {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.auth-btns button {
    padding: 0.5rem 1.5rem;
    border-radius: 60px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.auth-btns .login-btn {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
}

.auth-btns .login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.auth-btns .register-btn {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.auth-btns .register-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: scale(1.05);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem 0.6rem;
    border-top: 1px solid rgba(139, 92, 246, 0.05);
    justify-content: center;
    background: rgba(15, 12, 41, 0.3);
}

.quick-replies button {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    padding: 0.25rem 0.7rem;
    border-radius: 30px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.quick-replies button:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #fff;
}

@media (max-width: 700px) {
    .chat-window {
        width: 95vw;
        height: 65vh;
        border-radius: 1.5rem;
    }
    .chat-float {
        bottom: 0.8rem;
        right: 0.8rem;
    }
    .chat-toggle {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chat-footer {
        flex-direction: column;
        gap: 0.4rem;
    }
    .chat-footer .send-btn {
        width: 100%;
        justify-content: center;
    }
    .auth-btns {
        flex-direction: column;
        width: 100%;
    }
    .auth-btns button {
        width: 100%;
    }
    .quick-replies {
        gap: 0.2rem;
        padding: 0.2rem 0.5rem 0.4rem;
    }
    .quick-replies button {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        text-align: center;
        border-radius: 2rem;
        padding: 1rem;
    }
    .hero-card {
        padding: 1.8rem 1.2rem;
        border-radius: 2rem;
    }
    main {
        gap: 1rem;
    }
    button {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .description {
        font-size: 0.9rem;
        padding: 1rem;
    }
    .logo {
        justify-content: center;
    }
    .nav-links {
        justify-content: center;
    }
}