body {
    margin: 0;
    font-family: sans-serif;
    overflow: hidden; /* Ensure no scrollbars from animations */
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background: linear-gradient(to bottom right, #1a202c, #4a0e6e, #1a202c); /* from-slate-900 via-indigo-900 to-slate-900 */
    position: relative;
    overflow: hidden;
}

.background-layer {
    position: absolute;
    inset: 0;
}

.gradient-waves {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background: radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(34, 197, 94, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 30% 80%, rgba(168, 85, 247, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 70% 20%, rgba(251, 191, 36, 0.4) 0%, transparent 50%);
    animation: royal-float 20s ease-in-out infinite;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0.5;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}

.card-container {
    position: relative;
    z-index: 20;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
    overflow: hidden;
    width: min(70vw, 540px);
    height: min(88vh, 790px);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(1.25rem, 3vh, 2.5rem) clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(45deg, rgba(26, 32, 44, 0.7), rgba(74, 14, 110, 0.7), rgba(0, 0, 0, 0.7), rgba(26, 32, 44, 0.7));
    background-size: 400% 400%;
    animation: card-gradient-move 8s ease-in-out infinite;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 0; /* p-0 */
}

.logo-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.crown-container {
    position: relative;
    margin-bottom: 2rem; /* mb-8 */
    display: flex;
    justify-content: center;
}

.crown-base {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 1rem; /* h-4 */
    background: linear-gradient(to right, #fbbf24, #fcd34d, #fbbf24); /* from-yellow-500 via-amber-400 to-yellow-500 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
    border: 2px solid #d97706; /* border-2 border-yellow-600 */
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; /* animate-pulse */
}

.crown-point {
    position: absolute;
    bottom: 0.75rem; /* bottom-3 */
    border-radius: 0.5rem 0.5rem 0 0; /* rounded-t-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; /* animate-pulse */
}

.crown-point.left-1 { left: 0.25rem; width: 1rem; height: 2.5rem; background: linear-gradient(to top, #fbbf24, #fde047); border-left: 2px solid #d97706; border-right: 2px solid #d97706; }
.crown-point.left-5 { left: 1.25rem; width: 1rem; height: 3rem; background: linear-gradient(to top, #fcd34d, #fcd34d); border-left: 2px solid #f59e0b; border-right: 2px solid #f59e0b; }
.crown-point.center { left: 50%; transform: translateX(-50%); width: 1.25rem; height: 3.5rem; background: linear-gradient(to top, #d97706, #fde047); border-left: 2px solid #b45309; border-right: 2px solid #b45309; }
.crown-point.right-5 { right: 1.25rem; width: 1rem; height: 3rem; background: linear-gradient(to top, #fcd34d, #fcd34d); border-left: 2px solid #f59e0b; border-right: 2px solid #f59e0b; }
.crown-point.right-1 { right: 0.25rem; width: 1rem; height: 2.5rem; background: linear-gradient(to top, #fbbf24, #fde047); border-left: 2px solid #d97706; border-right: 2px solid #d97706; }

.crown-gem {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg or shadow-md */
    border: 2px solid;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* animate-ping */
}

.crown-gem.ruby { top: 0.25rem; left: 50%; transform: translateX(-50%); width: 1rem; height: 1rem; background: linear-gradient(to bottom right, #f87171, #b91c1c); border-color: #991b1b; }
.crown-gem.emerald { top: 0.75rem; left: 1.5rem; width: 0.75rem; height: 0.75rem; background: linear-gradient(to bottom right, #6ee7b7, #065f46); border-color: #047857; }
.crown-gem.sapphire { top: 0.75rem; right: 1.5rem; width: 0.75rem; height: 0.75rem; background: linear-gradient(to bottom right, #60a5fa, #1d4ed8); border-color: #1e40af; }

.crown-deco {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* animate-ping */
}
.crown-deco.left-2 { top: 0; left: 0.5rem; width: 0.5rem; height: 0.5rem; background: linear-gradient(to bottom right, #c084fc, #9333ea); }
.crown-deco.right-2 { top: 0; right: 0.5rem; width: 0.5rem; height: 0.5rem; background: linear-gradient(to bottom right, #c084fc, #9333ea); }

.sparkle-icon {
    position: absolute;
    color: #fde047; /* text-yellow-300 */
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* animate-ping */
}
.sparkle-icon.top-left { top: -0.75rem; left: -0.75rem; width: 1rem; height: 1rem; }
.sparkle-icon.top-right { top: -0.5rem; right: -0.75rem; width: 0.75rem; height: 0.75rem; color: #fcd34d; }
.sparkle-icon.top-center { top: -1rem; left: 50%; transform: translateX(-50%); width: 1rem; height: 1rem; color: #facc15; }
.sparkle-icon.bottom-left { left: -1rem; top: 0.5rem; width: 0.5rem; height: 0.5rem; color: #fbbf24; }
.sparkle-icon.bottom-right { right: -1rem; top: 0.5rem; width: 0.5rem; height: 0.5rem; color: #fbbf24; }


.title-section {
    margin-top: 1.5rem;
}

.title-text {
    margin: 0;
    font-size: clamp(4rem, 12vw, 6.8rem); /* text-8xl */
    font-weight: 700; /* font-bold */
    letter-spacing: 0.05em; /* tracking-wider */
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15)); /* drop-shadow-2xl */
    background-size: 400% 400%;
}

.divya-text {
    background-image: linear-gradient(45deg, #ef4444, #22c55e, #3b82f6, #a855f7, #f59e0b, #ec4899, #ef4444);
    animation: royal-gradient-move 4s ease-in-out infinite;
}

.library-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.2rem; /* Reduced vertical spacing (space-y-2) */
}

.educational-items-left {
    position: absolute;
    left: 0;
    display: flex;
    gap: 0.75rem; /* space-x-3 */
    transform: translateX(-3rem); /* -translate-x-12 */
}

.educational-item {
    animation: bounce 1s infinite; /* animate-bounce */
}

.educational-item.large { font-size: 2.25rem; /* text-4xl */ }
.educational-item.medium { font-size: 1.875rem; /* text-3xl */ }

.library-text {
    font-size: clamp(2.1rem, 6vw, 3.3rem); /* text-5xl */
    font-weight: 600; /* font-semibold */
    letter-spacing: 0.025em; /* tracking-wide */
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.1)); /* drop-shadow-xl */
    background-size: 400% 400%;
    background-image: linear-gradient(-45deg, #a855f7, #3b82f6, #22c55e, #ef4444, #f59e0b, #ec4899, #a855f7);
    animation: royal-gradient-move 4s ease-in-out infinite reverse;
}

.educational-items-right {
    position: absolute;
    right: 0;
    display: flex;
    gap: 0.75rem; /* space-x-3 */
    transform: translateX(3rem); /* translate-x-12 */
}

.decorative-line-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2.2rem; /* my-8 */
    margin-bottom: 2.1rem; /* my-8 */
    gap: 1rem; /* space-x-4 */
}

.decorative-line {
    width: 5rem; /* w-20 */
    height: 2px; /* h-0.5 */
}

.line-left { background: linear-gradient(to right, transparent, #fcd34d, transparent); } /* from-transparent via-amber-400 to-transparent */
.line-right { background: linear-gradient(to right, transparent, #34d399, transparent); } /* from-transparent via-emerald-400 to-transparent */

.star-icon {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
    color: #facc15; /* text-yellow-400 */
    animation: spin 8s linear infinite; /* animate-spin */
}

.tagline-section {
    margin-top: 0.5rem; /* space-y-2 */
}

.tagline-text {
    color: rgba(255, 255, 255, 0.8); /* text-white/80 */
    font-size: clamp(1rem, 2.7vw, 1.45rem); /* text-xl */
    font-weight: 300; /* font-light */
    letter-spacing: 0.05em; /* tracking-widest */
}

.star-deco-container {
    margin-top: clamp(2rem, 6vh, 3.8rem); /* mt-12 */
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 5vw, 3rem); /* space-x-12 */
}

.star-deco-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem; /* space-y-3 */
}

.star-deco-icon {
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; /* animate-pulse */
}

.star-deco-line {
    width: 4px; /* w-1 */
    height: 2.5rem; /* h-10 */
}

.star-deco-icon.red { color: #f87171; fill: rgba(248, 113, 113, 0.3); }
.star-deco-line.red { background: linear-gradient(to bottom, #f87171, transparent); }

.star-deco-icon.green { color: #6ee7b7; fill: rgba(110, 231, 183, 0.3); }
.star-deco-line.green { background: linear-gradient(to bottom, #6ee7b7, transparent); }

.star-deco-icon.blue { color: #60a5fa; fill: rgba(96, 165, 250, 0.3); }
.star-deco-line.blue { background: linear-gradient(to bottom, #60a5fa, transparent); }

.star-deco-icon.purple { color: #c084fc; fill: rgba(192, 132, 252, 0.3); }
.star-deco-line.purple { background: linear-gradient(to bottom, #c084fc, transparent); }

.star-deco-icon.gold { color: #facc15; fill: rgba(250, 204, 21, 0.3); }
.star-deco-line.gold { background: linear-gradient(to bottom, #facc15, transparent); }

.additional-sparkles {
    margin-top: clamp(1rem, 4vw, 2rem); /* mt-8 */
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* space-x-6 */
}

.additional-sparkle-icon {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* animate-ping */
}
.additional-sparkle-icon.amber { width: 1rem; height: 1rem; color: #fcd34d; }
.additional-sparkle-icon.emerald { width: 0.75rem; height: 0.75rem; color: #34d399; }
.additional-sparkle-icon.pink { width: 1rem; height: 1rem; color: #f472b6; }


/* Keyframes for animations */
@keyframes royal-float {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    25% { transform: translateY(-15px) rotate(2deg) scale(1.05); }
    50% { transform: translateY(-5px) rotate(-1deg) scale(0.95); }
    75% { transform: translateY(-10px) rotate(1deg) scale(1.02); }
}

@keyframes royal-gradient-move {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 100% 75%; }
    75% { background-position: 0% 75%; }
    100% { background-position: 0% 50%; }
}

@keyframes card-gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bubble-float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
    25% { transform: translateY(-100px) translateX(100px) scale(1.1); opacity: 0.5; }
    50% { transform: translateY(-200px) translateX(-100px) scale(0.9); opacity: 0.3; }
    75% { transform: translateY(-150px) translateX(150px) scale(1.05); opacity: 0.6; }
}

@keyframes royal-float-0 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-25px) translateX(15px) rotate(180deg); }
}

@keyframes royal-float-1 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-20px) translateX(-12px) rotate(-180deg); }
}

@keyframes royal-float-2 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-30px) translateX(8px) rotate(90deg); }
}

@keyframes royal-float-3 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-18px) translateX(-10px) rotate(-90deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(-25%) translateX(0); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0) translateX(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@media (max-width: 640px), (max-height: 520px) {
    .card-container {
        width: min(86vw, 390px);
        height: min(90vh, 560px);
        min-height: 500px;
        padding: clamp(0.85rem, 4vw, 1.3rem);
    }

    .logo-content {
        transform: scale(0.96);
        transform-origin: center;
    }

    .crown-container {
        margin-bottom: 0.75rem;
        transform: scale(0.72);
    }

    .title-section {
        margin-top: 0.45rem;
    }

    .title-text {
        font-size: clamp(3rem, 15vw, 4.8rem);
        letter-spacing: 0.035em;
    }

    .library-text {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
    }

    .tagline-text {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }

    .decorative-line-container {
        margin-top: 1.2rem;
        margin-bottom: 1.1rem;
    }

    .decorative-line {
        width: 3.6rem;
    }

    .educational-items-left,
    .educational-items-right {
        display: none;
    }

    .star-deco-container {
        margin-top: clamp(1.6rem, 6vh, 2.5rem);
        gap: clamp(1rem, 6vw, 1.8rem);
    }

    .star-deco-icon {
        width: 1.55rem;
        height: 1.55rem;
    }

    .star-deco-line {
        height: 1.9rem;
    }

    .additional-sparkles {
        margin-top: 1.1rem;
    }
}

@media (max-width: 390px) {
    .card-container {
        width: 86vw;
        height: min(90vh, 540px);
        min-height: 480px;
        padding: 0.75rem;
    }

    .logo-content {
        transform: scale(0.92);
    }

    .crown-container {
        transform: scale(0.66);
    }

    .title-text {
        font-size: clamp(2.65rem, 14vw, 4rem);
    }

    .library-text {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .star-deco-container {
        gap: 0.9rem;
    }
}
