/* 
 * StrangerFun Premium Stylesheet
 * Organized by sections: Global, Components, Home, Chat, Subpages, Animations
 */

/* =========================================
   1. GLOBAL / BASE STYLES
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    /* text-slate-800 */
    background-color: #f0f2f5;
    margin: 0;
}

/* App version (index.html) */
body.app-mode {
    height: 100vh;
    overflow: hidden;
}

/* Static pages (About, Terms, etc.) */
body.static-mode {
    min-height: 100vh;
    background-color: #f8fafc;
    overflow-y: auto;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Stranger Gradient Text */
.stranger-gradient {
    background: linear-gradient(-45deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 10px rgba(139, 92, 246, 0.2));
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
}

/* =========================================
   2. SHARED COMPONENTS
   ========================================= */

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =========================================
   3. HOME SECTION
   ========================================= */

/* Hero Action Cards */
.card-zoom {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-zoom:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Shine Effect for Cards */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

/* =========================================
   4. CHAT SECTION
   ========================================= */

/* Sticky components */
#ai-sticky-banner {
    position: sticky;
    top: 0;
    z-index: 40;
}

#chat-input-bar {
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 50;
}

#chat-log {
    flex: 1 1 0;
    overflow-y: auto !important;
    height: 100% !important;
    max-height: 100% !important;
    overscroll-behavior: contain;
}

/* Police Strip Style */
.police-caution-bg {
    background-color: #b91c1c;
    background-image: linear-gradient(45deg,
            rgba(0, 0, 0, 0.15) 25%,
            transparent 25%,
            transparent 50%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.15) 75%,
            transparent 75%,
            transparent);
    background-size: 40px 40px;
    animation: stripMove 1.5s linear infinite;
}

/* Typing Indicator Dots */
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

/* =========================================
   5. SUBPAGES (About, Terms, etc.)
   ========================================= */
.article-card {
    background: white;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Form Styles for Contact Page */
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.2s;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Guideline Items (Community Page) */
.guideline-item {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.guideline-item:hover {
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

/* =========================================
   6. ANIMATIONS
   ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-anim {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes fadeInSimple {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeInSimple 0.3s ease-out forwards;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.animate-float {
    animation: floating 3s ease-in-out infinite;
}

@keyframes stripMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 40px 0;
    }
}

@keyframes typing {

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

    40% {
        transform: scale(1);
    }
}