/* ============================================================
   kwetu Conn — Shared CSS
   Consolidated from 8 design mockups
   ============================================================ */

/* ── Base ──────────────────────────────────────────────────── */

:root {
    --color-bg: #031427;
    --color-surface: #102034;
    --color-surface-low: #0b1c30;
    --color-surface-lowest: #000f21;
    --color-primary: #ffb3b6;
    --color-primary-container: #e11d48;
    --color-on-surface: #d3e4fe;
    --color-on-surface-variant: #e5bdbe;
    --color-outline-variant: #5c3f40;
    --color-white-5: rgba(255, 255, 255, 0.05);
    --color-white-8: rgba(255, 255, 255, 0.08);
    --color-white-10: rgba(255, 255, 255, 0.10);
    --color-white-15: rgba(255, 255, 255, 0.15);
}

body {
    background-color: var(--color-bg);
    color: var(--color-on-surface);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Noise Texture Overlay ────────────────────────────────── */

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    opacity: 0.02;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ── Glassmorphism Cards ──────────────────────────────────── */

.glass-card,
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card-flat {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Glow Effects ─────────────────────────────────────────── */

.premium-glow,
.cta-glow,
.red-glow {
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.15);
}

.cta-glow-strong {
    box-shadow: 0 0 30px rgba(225, 29, 72, 0.4);
}

.hero-glow {
    background: radial-gradient(circle at 50% 50%, rgba(225, 29, 72, 0.15) 0%, rgba(3, 20, 39, 0) 70%);
}

/* ── Profile Gradient Overlay ─────────────────────────────── */

.profile-gradient {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
}

/* ── Gradient Text ────────────────────────────────────────── */

.gradient-text {
    background: linear-gradient(to right, #d3e4fe, #ffb3b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Chat Bubbles ─────────────────────────────────────────── */

.chat-bubble-sender {
    background: #e11d48;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}

.chat-bubble-receiver {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Input Focus Ring ─────────────────────────────────────── */

.input-focus-ring:focus {
    outline: none;
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1), inset 0 0 8px rgba(225, 29, 72, 0.05);
}

/* ── Active Pill ──────────────────────────────────────────── */

.active-pill {
    background: rgba(225, 29, 72, 0.1);
    color: #ffb3b6;
    border: 1px solid rgba(225, 29, 72, 0.3);
}

/* ── Scrollbar Hide ───────────────────────────────────────── */

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ── Custom Scrollbar ─────────────────────────────────────── */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #031427;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #1b2b3f;
    border-radius: 10px;
}

/* ── Scroll Reveal Animation ──────────────────────────────── */

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Button Hover Effects ─────────────────────────────────── */

.btn-hover-effect:active,
.btn-active-scale:active {
    transform: scale(0.95);
}

.glow-button {
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
}

.glow-button:hover {
    box-shadow: 0 0 25px 2px rgba(225, 29, 72, 0.4);
    transform: translateY(-1px);
}

.glow-button:active {
    transform: scale(0.98);
}

/* ── Material Symbols ─────────────────────────────────────── */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-filled {
    font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ── Animations ───────────────────────────────────────────── */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ── Glass-hover effect ───────────────────────────────────── */

.glass-hover:hover {
    border-color: #e11d48;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.15);
}

/* ── Bottom Navigation Safe Area ──────────────────────────── */

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Selection ────────────────────────────────────────────── */

::selection {
    background-color: rgba(225, 29, 72, 0.3);
    color: #ffffff;
}

/* ── Focus Visible (Accessibility) ────────────────────────── */

:focus-visible {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
}

/* ── Skeleton Loading ─────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Toast Notification ───────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-container);
    color: white;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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