@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #b2f0e6 0%, #e0c3fc 100%);
    min-height: 100vh;
    color: #333;
}

/* Mood backgrounds (for dynamic use) */
body.happy {
    background: linear-gradient(135deg, #fffbe7, #ffb300);
    color: #ffb300;
}

body.angry {
    background: linear-gradient(135deg, #ffeaea, #d32f2f);
    color: #d32f2f;
}

body.sad {
    background: linear-gradient(135deg, #e3f2fd, #1976d2);
    color: #1976d2;
}

body.anxious {
    background: linear-gradient(135deg, #f3e5f5, #7b1fa2);
    color: #7b1fa2;
}

body.dizzy {
    background: linear-gradient(135deg, #f0f4c3, #afb42b);
    color: #afb42b;
}

body.loneliness {
    background: linear-gradient(135deg, #eceff1, #607d8b);
    color: #607d8b;
}

body.chatbot-bg {
    background: #85cbf8 !important;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float-around 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    top: 20%;
    left: 10%;
    animation-duration: 25s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #e0c3fc, #b2f0e6);
    top: 60%;
    right: 15%;
    animation-duration: 30s;
    animation-direction: reverse;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ffb300, #ff6b6b);
    bottom: 30%;
    left: 20%;
    animation-duration: 22s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #4CAF50, #81C784);
    top: 10%;
    right: 30%;
    animation-duration: 28s;
    animation-direction: reverse;
}

.shape-5 {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #9C27B0, #E1BEE7);
    bottom: 20%;
    right: 10%;
    animation-duration: 35s;
}

@keyframes float-around {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(100px, -50px) rotate(90deg) scale(1.2);
    }
    50% {
        transform: translate(-50px, -100px) rotate(180deg) scale(0.8);
    }
    75% {
        transform: translate(-100px, 50px) rotate(270deg) scale(1.1);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* Enhanced Header */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(108, 115, 168, 0.08);
    z-index: 100;
    padding: 0 0 10px 0;
    text-align: center;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(108, 115, 168, 0.1);
}

header h2 {
    margin: 0;
    padding: 24px 0 8px 0;
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    position: relative;
    animation: header-glow 3s ease-in-out infinite alternate;
}

@keyframes header-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(108, 115, 168, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 20px rgba(108, 115, 168, 0.6));
    }
}

.glowing-text {
    animation: rainbow-glow 4s ease-in-out infinite alternate !important;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) !important;
    background-size: 400% 400% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

@keyframes rainbow-glow {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.6));
    }
    25% {
        background-position: 25% 50%;
        filter: drop-shadow(0 0 15px rgba(78, 205, 196, 0.6));
    }
    50% {
        background-position: 50% 50%;
        filter: drop-shadow(0 0 15px rgba(69, 183, 209, 0.6));
    }
    75% {
        background-position: 75% 50%;
        filter: drop-shadow(0 0 15px rgba(150, 206, 180, 0.6));
    }
    100% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 15px rgba(255, 234, 167, 0.6));
    }
}

/* Super Cool Enhanced Navigation */
.nav-container {
    position: relative;
    padding: 10px;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(108, 115, 168, 0.1));
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(108, 115, 168, 0.3);
    animation: nav-container-glow 4s ease-in-out infinite alternate;
}

@keyframes nav-container-glow {
    0% {
        box-shadow: 0 8px 32px rgba(108, 115, 168, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 12px 40px rgba(108, 115, 168, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3);
    }
}

.nav-background-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 107, 107, 0.1), 
        rgba(78, 205, 196, 0.1), 
        rgba(69, 183, 209, 0.1),
        rgba(150, 206, 180, 0.1),
        rgba(255, 234, 167, 0.1));
    background-size: 400% 400%;
    border-radius: 40px;
    animation: nav-bg-flow 8s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes nav-bg-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
}

.nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #6C73A8;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px 24px;
    border-radius: 35px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.nav-link-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 400% 400%;
    border-radius: 35px;
    opacity: 0;
    transition: all 0.6s ease;
    animation: bg-shift 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes bg-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
    border-radius: 35px;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 85%;
}

.nav-text {
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.nav-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 50%;
    animation: particle-float 2s ease-in-out infinite;
}

.nav-particles .particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.nav-particles .particle:nth-child(2) {
    top: 60%;
    right: 25%;
    animation-delay: 0.7s;
}

.nav-particles .particle:nth-child(3) {
    bottom: 30%;
    left: 70%;
    animation-delay: 1.4s;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-15px) scale(1.5);
        opacity: 1;
    }
}

.nav-link .nav-icon {
    font-size: 1.4em;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

.nav-link:hover .nav-icon {
    transform: scale(1.4) rotate(15deg) translateY(-3px);
    filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.8));
    animation: icon-glow 0.6s ease-in-out;
}

@keyframes icon-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(78, 205, 196, 1));
    }
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 247, 255, 0.9));
    color: #2c3e50;
    border-color: rgba(255, 107, 107, 0.6);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(108, 115, 168, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.nav-link:hover .nav-link-bg {
    opacity: 0.3;
}

.nav-link:hover .nav-particles {
    opacity: 1;
}

.nav-link:hover .nav-text {
    color: #2c3e50;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
    color: #2c3e50;
    border-color: rgba(255, 107, 107, 0.8);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    transform: translateY(-4px);
}

.nav-link.active .nav-link-bg {
    opacity: 0.4;
}

.nav-link.active .nav-particles {
    opacity: 0.8;
}

/* Pulse animation for active nav */
.nav-link.active .nav-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Main content */
main {
    max-width: 700px;
    margin: 32px auto 0 auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(108, 115, 168, 0.10);
    transition: all 0.5s ease;
}

.animated-main {
    animation: slide-up 0.8s ease-out, gentle-float 6s ease-in-out infinite;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slide-up {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentle-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

h3 {
    font-size: 1.3rem;
    color: #3a7ca5;
    margin-top: 0;
}

.pulse-text {
    animation: text-pulse 3s ease-in-out infinite;
    color: #3a7ca5;
    text-shadow: 0 0 20px rgba(58, 124, 165, 0.3);
}

@keyframes text-pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(58, 124, 165, 0.3);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(58, 124, 165, 0.6);
    }
}

.mood-selector-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(108, 115, 168, 0.1), rgba(224, 195, 252, 0.1));
    border-radius: 16px;
    border: 2px solid rgba(108, 115, 168, 0.2);
    animation: glow-border 4s ease-in-out infinite alternate;
}

@keyframes glow-border {
    0% {
        border-color: rgba(108, 115, 168, 0.2);
        box-shadow: 0 0 20px rgba(108, 115, 168, 0.1);
    }
    100% {
        border-color: rgba(108, 115, 168, 0.5);
        box-shadow: 0 0 30px rgba(108, 115, 168, 0.3);
    }
}

.animated-label {
    font-weight: 600;
    color: #6C73A8;
    display: block;
    margin-bottom: 10px;
    animation: bounce-in 1s ease-out 0.3s both;
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    50% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.animated-select {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid #b2f0e6;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f7fafd);
    color: #333;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slide-in-right 1s ease-out 0.5s both;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 115, 168, 0.1);
}

@keyframes slide-in-right {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.animated-select:focus {
    border: 2px solid #6C73A8;
    box-shadow: 0 0 0 4px rgba(108, 115, 168, 0.2), 0 8px 25px rgba(108, 115, 168, 0.3);
    transform: translateY(-2px);
}

.animated-select:hover {
    border-color: rgba(108, 115, 168, 0.6);
    box-shadow: 0 6px 20px rgba(108, 115, 168, 0.2);
    transform: translateY(-1px);
}

label[for="mood"] {
    font-weight: 500;
    margin-right: 10px;
}

#mood {
    padding: 8px 16px;
    border-radius: 16px;
    border: 1px solid #b2f0e6;
    font-size: 1rem;
    background: #f7fafd;
    color: #333;
    margin-bottom: 16px;
    outline: none;
    transition: border 0.2s;
}

#mood:focus {
    border: 1.5px solid #6C73A8;
}

/* Enhanced Advice cards */
.advice-card {
    background: linear-gradient(135deg, #f7fafd, #ffffff);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(108, 115, 168, 0.07);
    padding: 18px 24px;
    margin: 18px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    animation: card-appear 0.6s ease-out both;
    animation-delay: calc(var(--card-index, 0) * 0.1s);
}

@keyframes card-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.advice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 115, 168, 0.1), transparent);
    transition: left 0.6s;
}

.advice-card:hover::before {
    left: 100%;
}

.advice-card:hover {
    box-shadow: 0 15px 40px rgba(108, 115, 168, 0.2);
    transform: translateY(-8px) scale(1.02);
    border: 2px solid rgba(108, 115, 168, 0.3);
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
}

.advice-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 107, 107, 0.05), 
        rgba(78, 205, 196, 0.05), 
        rgba(69, 183, 209, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.advice-card:hover::after {
    opacity: 1;
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 18px 0 8px 0;
    text-align: center;
    color: #6C73A8;
    font-size: 1rem;
    background: transparent;
}

.animated-footer {
    animation: footer-slide-up 0.8s ease-out 1s both;
}

@keyframes footer-slide-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-text {
    background: linear-gradient(45deg, #6C73A8, #0066C3, #4CAF50);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 3s ease-in-out infinite;
}

@keyframes text-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.mood-emoji {
    font-size: 1.5rem;
    animation: emoji-bounce 2s ease-in-out infinite;
}

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

/* Emoji floating effect (if used) */
#emoji-float-container {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
}

.floating-emoji {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.85;
    animation: float-emoji 6s linear infinite;
}

@keyframes float-emoji {
    0% {
        transform: translateY(100vh) scale(1) rotate(0deg);
        opacity: 0.7;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 800px) {
    main {
        max-width: 98vw;
        padding: 10px;
    }

    .advice-card {
        padding: 12px 8px;
    }

    header h2 {
        font-size: 1.2rem;
        padding: 16px 0 6px 0;
    }
}

.games-gallery {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}

/* Enhanced Game Cards */
.game-card {
    background: #f7fafd;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(108, 115, 168, 0.07);
    padding: 18px 24px;
    width: 220px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #b2f0e6;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 115, 168, 0.1), transparent);
    transition: left 0.6s;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    box-shadow: 0 10px 30px rgba(108, 115, 168, 0.15);
    transform: translateY(-5px);
    border: 2px solid rgba(108, 115, 168, 0.2);
}

/* Enhanced Play Buttons */
.play-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(108, 115, 168, 0.3);
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover:not(.disabled) {
    background: linear-gradient(45deg, #3a7ca5, #004d9f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 115, 168, 0.4);
}

.play-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(108, 115, 168, 0.3);
}

.play-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

#hunt-chase-container {
    display: none;
    margin-bottom: 32px;
}

/* Custom Cursor Effects */
body {
    cursor: none;
}

/* Restore cursor for interactive elements */
input, textarea, button, select, .chat-container * {
    cursor: auto !important;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 20px rgba(108, 115, 168, 0.5);
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(108, 115, 168, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: linear-gradient(45deg, #e0c3fc, #b2f0e6);
}

.custom-cursor.hover::before {
    width: 60px;
    height: 60px;
    border-color: rgba(108, 115, 168, 0.6);
}

.custom-cursor.click {
    transform: scale(0.8);
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
}

/* Cursor trail */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: rgba(108, 115, 168, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: trail-fade 0.8s ease-out forwards;
}

@keyframes trail-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Floating Particles */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(108, 115, 168, 0.3);
    border-radius: 50%;
    animation: float-particle 15s infinite linear;
    pointer-events: none;
    z-index: -1;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Mood-based particle colors */
body.happy .particle {
    background: rgba(255, 179, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.3);
}

body.angry .particle {
    background: rgba(211, 47, 47, 0.4);
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.3);
}

body.sad .particle {
    background: rgba(25, 118, 210, 0.4);
    box-shadow: 0 0 10px rgba(25, 118, 210, 0.3);
}

body.anxious .particle {
    background: rgba(123, 31, 162, 0.4);
    box-shadow: 0 0 10px rgba(123, 31, 162, 0.3);
}

body.dizzy .particle {
    background: rgba(175, 180, 43, 0.4);
    box-shadow: 0 0 10px rgba(175, 180, 43, 0.3);
}

body.loneliness .particle {
    background: rgba(96, 125, 139, 0.4);
    box-shadow: 0 0 10px rgba(96, 125, 139, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        cursor: auto;
        /* Disable custom cursor on mobile */
    }

    .custom-cursor {
        display: none;
    }

    .particle {
        display: none;
        /* Disable particles on mobile */
    }

    .nav {
        gap: 4px;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 1rem;
    }

    header h2 {
        font-size: 1.5rem;
    }
}

/* === CHAT INTERFACE STYLES === */

/* Chat Container */
.chat-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

/* Chat Header */
.chat-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    border-bottom: 2px solid rgba(108, 115, 168, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.chat-info h3 {
    margin: 0 0 5px 0;
    color: #6C73A8;
    font-size: 1.4rem;
}

.chat-description {
    color: #666;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mood-selector-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mood-selector-mini label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.mood-selector-mini select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.mood-selector-mini select:focus {
    border-color: #6C73A8;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
}

.system-message {
    justify-content: center;
    margin: 10px 0;
}

.system-message .message-content {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    padding: 12px 20px;
    border-radius: 20px;
    text-align: center;
    color: #6C73A8;
    font-weight: 500;
    border: 2px solid rgba(108, 115, 168, 0.2);
}

.other-message {
    align-self: flex-start;
}

.my-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(108, 115, 168, 0.3);
}

.message-bubble {
    background: white;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    border: 1px solid rgba(108, 115, 168, 0.1);
    transition: all 0.3s ease;
}

.message-bubble:hover {
    box-shadow: 0 4px 15px rgba(108, 115, 168, 0.2);
    transform: translateY(-1px);
}

.my-message .message-bubble {
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    color: white;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.username {
    font-weight: 600;
    color: #6C73A8;
}

.my-message .username {
    color: white;
}

.mood-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.mood-badge.happy { background: rgba(255, 193, 7, 0.2); }
.mood-badge.sad { background: rgba(33, 150, 243, 0.2); }
.mood-badge.anxious { background: rgba(156, 39, 176, 0.2); }
.mood-badge.peaceful { background: rgba(76, 175, 80, 0.2); }
.mood-badge.excited { background: rgba(255, 87, 34, 0.2); }

.timestamp {
    color: #888;
    margin-left: auto;
}

.my-message .timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.message-text {
    line-height: 1.4;
    word-wrap: break-word;
}

/* Chat Input Area */
.chat-input-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 16px 16px;
    padding: 20px;
    border-top: 2px solid rgba(108, 115, 168, 0.1);
}

.username-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emoji-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    background: rgba(108, 115, 168, 0.05);
    border-radius: 12px;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emoji-btn:hover {
    background: rgba(108, 115, 168, 0.1);
    transform: scale(1.2);
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

#username-input,
#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

#username-input:focus,
#message-input:focus {
    border-color: #6C73A8;
    box-shadow: 0 0 0 3px rgba(108, 115, 168, 0.1);
}

.join-btn,
.send-btn {
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(108, 115, 168, 0.3);
}

.join-btn:hover,
.send-btn:hover {
    background: linear-gradient(45deg, #3a7ca5, #004d9f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 115, 168, 0.4);
}

.send-icon {
    font-size: 1rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #6C73A8;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modal-slide-in 0.3s ease;
}

@keyframes modal-slide-in {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content h3 {
    color: #6C73A8;
    margin: 0 0 20px 0;
    text-align: center;
}

.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.guidelines-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.guidelines-list li:last-child {
    border-bottom: none;
}

.accept-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.accept-btn:hover {
    background: linear-gradient(45deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Chat Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        margin: 10px;
        padding: 0 10px;
        height: calc(100vh - 180px);
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .chat-messages {
        padding: 15px;
    }

    .message-bubble {
        max-width: 280px;
    }

    .emoji-picker {
        padding: 8px;
    }

    .emoji-btn {
        font-size: 1rem;
        padding: 4px;
    }

    .input-group {
        flex-direction: column;
    }

    #message-input {
        margin-bottom: 8px;
    }

    .send-btn {
        width: 100%;
        justify-content: center;
    }

    .username-input-container {
        flex-direction: column;
    }

    #username-input {
        margin-bottom: 10px;
    }

    .join-btn {
        width: 100%;
        justify-content: center;
    }
}

/* === MODERN MESSAGING APP STYLES === */

.simple-chat-container {
    max-width: 800px;
    margin: 10px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(108, 115, 168, 0.15);
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.simple-chat-header {
    text-align: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5ea;
    background: #f8f9fa;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.simple-chat-header h3 {
    margin: 0 0 5px 0;
    color: #6C73A8;
    font-size: 1.5rem;
}

.simple-chat-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.simple-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    scroll-behavior: smooth;
    min-height: 0;
}

.simple-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    position: relative;
}

.simple-message.system {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    color: #6C73A8;
    text-align: center;
    margin: 10px auto;
    font-weight: 500;
    border: 1px solid rgba(108, 115, 168, 0.2);
    max-width: 80%;
}

.simple-message.other {
    background: white;
    align-self: flex-start;
    margin-right: auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border-radius: 18px 18px 18px 4px;
}

.simple-message.my-message {
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 1px 2px rgba(108, 115, 168, 0.3);
}

.simple-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.simple-username {
    font-weight: 600;
    color: #6C73A8;
}

.simple-message.my-message .simple-username {
    color: white;
}

.simple-timestamp {
    color: #888;
    font-size: 0.8rem;
}

.simple-message.my-message .simple-timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.simple-message-text {
    line-height: 1.4;
    word-wrap: break-word;
}

.simple-chat-input {
    border-top: 2px solid rgba(108, 115, 168, 0.1);
    padding: 20px;
    background: rgba(255, 255, 255, 0.98);
    flex-shrink: 0;
}

.simple-username-setup {
    display: flex;
    gap: 10px;
    align-items: center;
}

.simple-chat-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.simple-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    min-height: 50px;
}

#username-input,
#message-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    min-height: 50px;
    box-sizing: border-box;
    background: #f8f9fa;
}

#username-input:focus,
#message-input:focus {
    border-color: #6C73A8;
    background: white;
    box-shadow: 0 0 0 3px rgba(108, 115, 168, 0.1);
}

.simple-btn {
    background: linear-gradient(45deg, #6C73A8, #0066C3);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 115, 168, 0.3);
    flex-shrink: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simple-btn:hover {
    background: linear-gradient(45deg, #3a7ca5, #004d9f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 115, 168, 0.4);
}

/* Mobile Chat Styles */
@media (max-width: 768px) {
    .simple-chat-container {
        margin: 10px;
        height: calc(100vh - 140px);
        border-radius: 12px;
    }

    .simple-chat-header {
        padding: 15px;
    }

    .simple-chat-header h3 {
        font-size: 1.2rem;
    }

    .simple-chat-messages {
        padding: 15px;
    }

    .simple-message {
        max-width: 85%;
        padding: 10px 14px;
    }

    .simple-chat-input {
        padding: 15px;
    }

    .simple-input-group {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
    }

    #username-input,
    #message-input {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .simple-btn {
        min-width: 70px;
        flex-shrink: 0;
        padding: 12px 16px;
    }

    .simple-username-setup {
        flex-direction: column;
        gap: 10px;
    }

    #username-input {
        margin-bottom: 0;
    }
}