/* ============================================
   DATING SWIPE APP - Modern Premium Styles
   ============================================ */

/* CSS Variables */
:root {
    --bg-gradient-start: #0a0a0f;
    --bg-gradient-end: #1a1a2e;
    --accent: #ff4b7d;
    --accent-hover: #ff6b95;
    --accent-gradient: linear-gradient(135deg, #ff4b7d 0%, #ff6b95 50%, #ff8fb3 100%);
    --accent-gradient-hover: linear-gradient(135deg, #ff6b95 0%, #ff8fb3 50%, #ffa8c8 100%);
    --text-primary: #ffffff;
    --text-secondary: #d6d6e0;
    --ui-dark: #1e1e2e;
    --ui-darker: #252538;
    --ui-darkest: #151520;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-glow: rgba(255, 75, 125, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    color-scheme: dark;
    background-color: #050509;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, #0f0f1a 30%, var(--bg-gradient-end) 100%);
    background-color: #0a0a0f;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    color-scheme: dark;
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 75, 125, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 149, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 143, 179, 0.04) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Animated heart silhouettes background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50,85 C30,70 10,55 10,35 C10,20 20,10 35,10 C42,10 48,15 50,20 C52,15 58,10 65,10 C80,10 90,20 90,35 C90,55 70,70 50,85 Z' fill='none' stroke='rgba(255,75,125,0.15)' stroke-width='1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50,85 C30,70 10,55 10,35 C10,20 20,10 35,10 C42,10 48,15 50,20 C52,15 58,10 65,10 C80,10 90,20 90,35 C90,55 70,70 50,85 Z' fill='none' stroke='rgba(255,107,149,0.12)' stroke-width='1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50,85 C30,70 10,55 10,35 C10,20 20,10 35,10 C42,10 48,15 50,20 C52,15 58,10 65,10 C80,10 90,20 90,35 C90,55 70,70 50,85 Z' fill='none' stroke='rgba(255,143,179,0.1)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 200px 200px, 150px 150px, 120px 120px;
    background-position: 0 0, 100px 100px, 200px 50px;
    background-repeat: repeat;
    animation: heartsFloat 30s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes heartsFloat {
    0% {
        background-position: 0 0, 100px 100px, 200px 50px;
        transform: translateY(0);
    }
    25% {
        background-position: -100px 50px, 200px 150px, 300px 100px;
        transform: translateY(-20px);
    }
    50% {
        background-position: -200px 100px, 300px 200px, 400px 150px;
        transform: translateY(-10px);
    }
    75% {
        background-position: -300px 50px, 400px 100px, 500px 50px;
        transform: translateY(-30px);
    }
    100% {
        background-position: -400px 0, 500px 50px, 600px 0;
        transform: translateY(0);
    }
}

@keyframes backgroundShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* ============================================
   SPLASH SCREEN
   ============================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, #0f0f1a 30%, var(--bg-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(255, 75, 125, 0.8));
    animation: splashHeartbeat 1.2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.splash-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 75, 125, 0.4);
    border-radius: 50%;
    animation: splashPulseRing 2s ease-out infinite;
    z-index: 1;
}

.splash-pulse-ring-2 {
    animation-delay: 0.6s;
    border-color: rgba(255, 107, 149, 0.3);
}

@keyframes splashHeartbeat {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(255, 75, 125, 0.8));
    }
    10% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 35px rgba(255, 75, 125, 1));
    }
    20% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(255, 75, 125, 0.8));
    }
    30% {
        transform: scale(1.12);
        filter: drop-shadow(0 0 40px rgba(255, 75, 125, 1));
    }
    40% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(255, 75, 125, 0.8));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(255, 75, 125, 0.9));
    }
    60% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(255, 75, 125, 0.8));
    }
}

@keyframes splashPulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* ============================================
   APP CONTAINER & HEADER
   ============================================ */

.app-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.app-container.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInApp 0.6s ease-out forwards;
}

@keyframes fadeInApp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.swipe-header {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    text-align: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    z-index: 100;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: уменьшенные отступы для логотипа */
@media (min-width: 769px) {
    .swipe-header {
        padding: 5px 20px;
        padding-top: calc(5px + env(safe-area-inset-top));
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(255, 75, 125, 0.7));
    animation: logoPulse 1.2s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 75, 125, 0.7));
    }
    10% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 75, 125, 0.9));
    }
    20% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 75, 125, 0.7));
    }
    30% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 25px rgba(255, 75, 125, 1));
    }
    40% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 75, 125, 0.7));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 18px rgba(255, 75, 125, 0.8));
    }
    60% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 75, 125, 0.7));
    }
}

/* ============================================
   SWIPE CONTAINER & CARDS
   ============================================ */

.swipe-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    min-height: 0;
    overflow: visible;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

/* Desktop: уменьшенные отступы контейнера */
@media (min-width: 769px) {
    .swipe-container {
        padding: 10px 20px;
    }
}

.swipe-card {
    position: absolute;
    width: calc(100% - 40px);
    max-width: 420px;
    height: calc(100vh - 320px);
    max-height: 600px;
    min-height: 500px;
    border-radius: 24px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 75, 125, 0.1),
                0 0 30px rgba(255, 75, 125, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin: 0 auto;
    will-change: transform, opacity;
}

.swipe-card:active {
    cursor: grabbing;
}

/* Desktop: уменьшенная карточка для размещения на экране */
@media (min-width: 769px) {
    .swipe-card {
        width: calc(100% - 40px);
        max-width: 360px;
        height: calc(100vh - 240px);
        max-height: 480px;
        min-height: 400px;
    }
}

.swipe-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 10;
    position: relative;
    animation: cardAppear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
}
}

.swipe-card:active {
    cursor: grabbing;
}

.card-image {
    width: 100%;
    height: 70%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    }

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
}

.card-header {
    margin-bottom: 15px;
}

.card-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.card-location {
    font-size: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.interest-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 75, 125, 0.2);
    border: 1px solid rgba(255, 75, 125, 0.4);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   SWIPE ACTION BUTTONS
   ============================================ */

.swipe-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 25px 20px;
    padding-bottom: calc(25px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.85) 50%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

/* Mobile panel animation */
.mobile-bottom-panel {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

/* Desktop: уменьшенные отступы для кнопок */
@media (min-width: 769px) {
    .swipe-actions {
        padding: 15px 20px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.action-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.2s;
}

.action-dislike {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.action-dislike:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.2);
}

.action-superlike {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 2px solid rgba(255, 215, 0, 0.4);
}

.action-superlike:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.3);
}

.action-like {
    background: var(--accent-gradient);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(255, 75, 125, 0.4);
}

.action-like:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 75, 125, 0.6);
}

.action-btn:active {
    transform: scale(0.95);
}

/* ============================================
   SWIPE STAMPS
   ============================================ */

.swipe-stamp {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg) scale(0.8);
    font-size: 72px;
    font-weight: 900;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    letter-spacing: 4px;
    animation: stampPulse 0.6s ease-out;
}

@keyframes stampPulse {
    0% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(0.5);
        opacity: 0;
}
    50% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-15deg) scale(1);
        opacity: 1;
    }
}

.swipe-stamp-like {
    color: #4ade80;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.8);
}

.swipe-stamp-dislike {
    color: #f87171;
    text-shadow: 0 0 30px rgba(248, 113, 113, 0.8);
}

/* ============================================
   MATCH MODAL
   ============================================ */

.match-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px) saturate(180%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.match-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.match-modal {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(37, 37, 56, 0.95) 100%);
    border-radius: 32px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    border: 2px solid rgba(255, 75, 125, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 75, 125, 0.2),
                0 0 40px rgba(255, 75, 125, 0.3);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    animation: matchModalAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes matchModalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.match-animation {
    margin-bottom: 30px;
    height: 100px;
    position: relative;
}

.match-hearts {
    position: relative;
    width: 100%;
    height: 100%;
}

.heart {
    position: absolute;
    font-size: 40px;
    animation: heartFloat 2s ease-in-out infinite;
}

.heart-1 {
    left: 20%;
    animation-delay: 0s;
}

.heart-2 {
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.3s;
    font-size: 50px;
    }

.heart-3 {
    right: 20%;
    animation-delay: 0.6s;
}

@keyframes heartFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 0.8;
    }
}

.match-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-avatar-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 75, 125, 0.5);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 75, 125, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 75, 125, 0.8);
    }
}

.match-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-subtitle {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
}

.match-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.match-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 36px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.match-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ============================================
   CHAT SCREEN
   ============================================ */

.chat-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px) saturate(180%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.chat-screen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(30, 30, 46, 0.95) 0%, rgba(37, 37, 56, 0.95) 100%);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 20px 24px;
    padding-top: calc(20px + env(safe-area-inset-top));
    background: linear-gradient(135deg, rgba(37, 37, 56, 0.9) 0%, rgba(30, 30, 46, 0.9) 100%);
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 75, 125, 0.2);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
}

.chat-back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.chat-back-btn svg {
    width: 24px;
    height: 24px;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(255, 75, 125, 0.4);
}

.chat-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #4ade80;
    border: 2px solid var(--ui-darkest);
    border-radius: 50%;
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 14px;
    color: #4ade80;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--ui-darkest);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--ui-darker);
    border-radius: 3px;
}

.message {
    display: flex;
    animation: fadeInSlide 0.3s ease-out;
    max-width: 75%;
}

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

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

.message-bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.bot .message-bubble {
    background: linear-gradient(135deg, rgba(255, 75, 125, 0.3) 0%, rgba(255, 107, 149, 0.2) 100%);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
    border: 1px solid rgba(255, 75, 125, 0.25);
    box-shadow: 0 2px 15px rgba(255, 75, 125, 0.2);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.message.user .message-bubble {
    background: linear-gradient(135deg, rgba(37, 37, 56, 0.8) 0%, rgba(26, 26, 36, 0.8) 100%);
    border-bottom-right-radius: 4px;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.chat-typing {
    padding: 0 24px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.typing-indicator::before,
.typing-indicator::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator::after {
    animation-delay: 0.2s;
}

.chat-input-container {
    padding: 20px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(37, 37, 56, 0.9) 0%, rgba(26, 26, 36, 0.9) 100%);
    border-top: 1px solid rgba(255, 75, 125, 0.2);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
}

.chat-input {
    flex: 1;
    background: rgba(26, 26, 36, 0.7);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    line-height: 1.5;
    transition: var(--transition);
    touch-action: manipulation;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 75, 125, 0.25);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-send {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 75, 125, 0.3);
}

.chat-send:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 75, 125, 0.4);
}

.chat-send svg {
    width: 18px;
    height: 18px;
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cta-button-container {
    margin-top: 20px;
    text-align: center;
    padding: 20px 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent-gradient);
    background-size: 200% auto;
    color: var(--text-primary);
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(255, 75, 125, 0.4);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(255, 75, 125, 0.6);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(-1px);
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
    }

.btn-secondary {
    background: rgba(37, 37, 56, 0.7);
    color: var(--text-primary);
    border: 2px solid rgba(255, 75, 125, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(26, 26, 36, 0.8);
    border-color: var(--accent);
}

/* ============================================
   NO MORE CARDS
   ============================================ */

.no-more-cards {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-more-cards h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .swipe-header {
        padding: 10px 15px;
        padding-top: calc(10px + env(safe-area-inset-top));
        flex-shrink: 0;
    }
    
    .logo-icon {
        width: 140px;
        height: 140px;
    }
    
    .swipe-container {
        padding: 10px 15px;
        flex: 1;
        min-height: 0;
    }

    .swipe-card {
        width: calc(100% - 30px);
        max-width: 380px;
        height: calc(100vh - 340px);
        max-height: 500px;
        min-height: 400px;
    }

    .card-content {
        padding: 18px;
    }

    .card-name {
        font-size: 26px;
        margin-bottom: 6px;
    }
    
    .card-location {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .card-interests {
        gap: 6px;
    }

    .interest-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .action-btn {
        width: 55px;
        height: 55px;
    }
    
    .action-btn svg {
        width: 24px;
        height: 24px;
    }

    .swipe-actions {
        padding: 15px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
        gap: 25px;
        flex-shrink: 0;
    }

    .match-modal {
        padding: 40px 30px;
        margin: 20px;
    }

    .match-title {
        font-size: 28px;
    }

    .match-avatar-container {
        width: 120px;
        height: 120px;
    }

    .swipe-stamp {
        font-size: 56px;
    }
}

@media (max-width: 480px) {
    .swipe-header {
        padding: 8px 12px;
        padding-top: calc(8px + env(safe-area-inset-top));
        flex-shrink: 0;
    }
    
    .logo-icon {
        width: 120px;
        height: 120px;
    }

    .swipe-container {
        padding: 8px 12px;
        flex: 1;
        min-height: 0;
    }

    .swipe-card {
        width: calc(100% - 24px);
        max-width: 100%;
        height: calc(100vh - 310px);
        max-height: 460px;
        min-height: 360px;
    }

    .card-content {
        padding: 16px;
    }

    .card-name {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .card-location {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .card-interests {
        gap: 5px;
    }

    .interest-tag {
        font-size: 10px;
        padding: 4px 8px;
    }

    .swipe-actions {
        gap: 18px;
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        flex-shrink: 0;
    }

    .action-btn {
        width: 50px;
        height: 50px;
    }

    .action-btn svg {
        width: 20px;
        height: 20px;
    }

    .message {
        max-width: 85%;
    }

    .chat-send span {
        display: none;
    }

    .chat-send {
        padding: 12px;
        border-radius: 50%;
    }
}

/* ============================================
   MOBILE BOTTOM PANEL (Liquid Glass iOS Style)
   ============================================ */

.mobile-bottom-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3),
                0 -1px 0 rgba(255, 255, 255, 0.1) inset;
    z-index: 1000;
    gap: 8px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.1s forwards;
}

/* Desktop: боковая панель справа */
@media (min-width: 769px) {
    .mobile-bottom-panel {
        display: flex;
        position: fixed;
        top: 50%;
        right: 20px;
        bottom: auto;
        left: auto;
        transform: translateY(-50%);
        flex-direction: column;
        width: auto;
        padding: 16px 12px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3),
                    0 0 0 1px rgba(255, 75, 125, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
        gap: 10px;
    }
    
    .mobile-bottom-panel::before {
        display: none;
    }
    
    .mobile-panel-btn {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 14px;
        min-width: 160px;
        white-space: nowrap;
    }
    
    .mobile-panel-icon {
        width: 18px;
        height: 18px;
    }
    
    .mobile-panel-text {
        font-size: 13px;
    }
}

.mobile-bottom-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 75, 125, 0.3) 20%, 
        rgba(255, 75, 125, 0.5) 50%, 
        rgba(255, 75, 125, 0.3) 80%, 
        transparent 100%);
}

.mobile-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex: 1;
    min-width: 0;
}

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

.mobile-panel-btn:hover::before,
.mobile-panel-btn:active::before {
    left: 100%;
}

.mobile-panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mobile-panel-btn:active {
    transform: translateY(0);
}

.mobile-panel-btn-primary {
    background: linear-gradient(135deg, 
        rgba(255, 75, 125, 0.3) 0%, 
        rgba(255, 107, 149, 0.25) 100%);
    border: 1px solid rgba(255, 75, 125, 0.4);
    box-shadow: 0 4px 20px rgba(255, 75, 125, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mobile-panel-btn-primary:hover {
    background: linear-gradient(135deg, 
        rgba(255, 75, 125, 0.4) 0%, 
        rgba(255, 107, 149, 0.35) 100%);
    border-color: rgba(255, 75, 125, 0.6);
    box-shadow: 0 6px 30px rgba(255, 75, 125, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mobile-panel-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

.mobile-panel-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Show mobile panel on mobile (bottom) */
@media (max-width: 768px) {
    .mobile-bottom-panel {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        flex-direction: row;
        width: 100%;
    }
    
    .swipe-actions {
        padding-bottom: calc(75px + env(safe-area-inset-bottom));
    }
    
    .swipe-card {
        height: calc(100vh - 340px);
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .mobile-bottom-panel {
        padding: 8px 12px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        gap: 6px;
    }
    
    .mobile-panel-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
        border-radius: 10px;
    }
    
    .mobile-panel-icon {
        width: 14px;
        height: 14px;
    }
    
    .mobile-panel-text {
        font-size: 12px;
    }
    
    .swipe-actions {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    .swipe-card {
        height: calc(100vh - 310px);
        max-height: 460px;
    }
}
