/* ========== CSS Variables ========== */
:root {
    --primary: #FF6B6B;
    --primary-dark: #ee5a5a;
    --primary-light: #ff8a8a;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --dark-light: #34495E;
    --gray: #95A5A6;
    --gray-light: #ECF0F1;
    --white: #FFFFFF;
    --success: #27AE60;
    --warning: #F39C12;
    --danger: #E74C3C;
    --gradient: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    --gradient-cool: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-full: 50px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ========== Typography ========== */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-google {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-light);
}

.btn-google:hover {
    background: var(--gray-light);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-back {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: var(--primary);
}

/* ========== Pages ========== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ========== Landing Page ========== */
#landing-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.logo i {
    color: var(--primary);
    font-size: 28px;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.landing-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 100px 5% 50px;
    gap: 50px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 56px;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.intent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 400px;
}

.preview-card {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.preview-card .card-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-card .card-avatar i {
    font-size: 32px;
    color: var(--white);
}

.preview-card span {
    display: block;
    font-weight: 600;
    color: var(--dark);
}

.preview-card small {
    color: var(--gray);
}

.card-1 {
    top: 0;
    left: 0;
    z-index: 3;
    animation-delay: 0s;
}

.card-2 {
    top: 50px;
    left: 100px;
    z-index: 2;
    animation-delay: 0.5s;
}

.card-3 {
    top: 100px;
    left: 50px;
    z-index: 1;
    animation-delay: 1s;
}

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

/* ========== Auth Pages ========== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 20px;
    color: var(--dark);
}

.auth-header h2 {
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--gray);
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 16px;
    left: auto;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--dark-light);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

.auth-divider span {
    padding: 0 16px;
    color: var(--gray);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 14px;
}

.terms-checkbox {
    margin-bottom: 20px;
    font-size: 13px;
}

/* Intent Checkboxes */
.intent-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.intent-checkbox {
    position: relative;
}

.intent-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.intent-checkbox span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--dark);
}

.intent-checkbox input:checked + span {
    background: var(--primary);
    color: var(--white);
}

.intent-checkbox span i {
    font-size: 16px;
}

/* ========== App Navigation ========== */
.app-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--gray);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--white);
    background: var(--gradient);
}

.nav-link .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* ========== Tab Content ========== */
.tab-content {
    display: none;
    padding: 100px 5% 40px;
    min-height: 100vh;
}

.tab-content.active {
    display: block;
}

/* ========== Discover Tab ========== */
.discover-container {
    max-width: 500px;
    margin: 0 auto;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: var(--white);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
}

.swipe-container {
    position: relative;
}

.card-stack {
    position: relative;
    width: 100%;
    height: 500px;
}

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease;
}

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

.swipe-card.removing {
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.swipe-card.removing.left {
    transform: translateX(-150%) rotate(-30deg);
}

.swipe-card.removing.right {
    transform: translateX(150%) rotate(30deg);
}

.card-image {
    height: 60%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image i {
    font-size: 100px;
    color: rgba(255, 255, 255, 0.5);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
}

.card-badge span {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 12px;
}

.card-info {
    padding: 24px;
}

.card-info h3 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 8px;
}

.card-info h3 span {
    font-weight: 400;
    color: var(--gray);
}

.card-info p {
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.6;
}

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

.card-interests span {
    padding: 6px 14px;
    background: var(--gray-light);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--dark-light);
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.action-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.dislike {
    background: var(--white);
    color: var(--danger);
    box-shadow: var(--shadow);
}

.action-btn.superlike {
    background: var(--white);
    color: var(--secondary);
    box-shadow: var(--shadow);
}

.action-btn.like {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* ========== Matches Tab ========== */
.matches-container {
    max-width: 900px;
    margin: 0 auto;
}

.matches-container h2 {
    color: var(--white);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.match-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.match-card:hover {
    transform: translateY(-5px);
}

.match-card-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-card-image i {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.5);
}

.match-card-info {
    padding: 16px;
}

.match-card-info h4 {
    color: var(--dark);
    margin-bottom: 4px;
}

.match-card-info p {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 12px;
}

.match-card-info .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== Messages Tab ========== */
.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    height: calc(100vh - 140px);
}

.conversations-list {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.conversations-list h2 {
    padding: 20px;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-bottom: 1px solid var(--gray-light);
}

.conversation-item:hover,
.conversation-item.active {
    background: var(--gray-light);
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conversation-avatar i {
    color: var(--white);
    font-size: 20px;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-info h4 {
    color: var(--dark);
    font-size: 14px;
    margin-bottom: 4px;
}

.conversation-info p {
    color: var(--gray);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    text-align: right;
}

.conversation-time {
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 4px;
}

.unread-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.chat-window {
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.chat-placeholder i {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
}

.message.sent {
    align-self: flex-end;
    background: var(--gradient);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: var(--gray-light);
    color: var(--dark);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-light);
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: var(--primary);
}

.chat-input button {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--gradient);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.05);
}

/* ========== Profile Tab ========== */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-avatar i {
    font-size: 48px;
    color: var(--white);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.avatar-edit:hover {
    transform: scale(1.1);
}

.avatar-edit i {
    font-size: 14px;
    color: var(--dark);
}

#avatar-upload {
    display: none;
}

.profile-header h2 {
    color: var(--dark);
    margin-bottom: 8px;
}

.profile-header p {
    color: var(--gray);
}

.profile-form .form-section {
    margin-bottom: 30px;
}

.profile-form .form-section h3 {
    color: var(--dark);
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-light);
}

.profile-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.profile-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.profile-intents {
    grid-template-columns: repeat(2, 1fr);
}

.interests-input {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.interests-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.interests-input input:focus {
    border-color: var(--primary);
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-light);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--dark);
}

.interest-tag button {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

.interest-tag button:hover {
    color: var(--danger);
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.match-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1s ease infinite;
}

.match-animation i {
    font-size: 48px;
    color: var(--white);
}

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

.match-modal-content h2 {
    color: var(--dark);
    margin-bottom: 8px;
}

.match-modal-content p {
    color: var(--gray);
    margin-bottom: 24px;
}

.match-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.match-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-avatar i {
    font-size: 32px;
    color: var(--white);
}

.match-heart {
    color: var(--primary);
    font-size: 24px;
    animation: heartbeat 1s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.match-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    z-index: 1001;
}

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

.toast i {
    color: var(--success);
}

/* ========== Responsive Design ========== */
@media (max-width: 992px) {
    .landing-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .intent-tags {
        justify-content: center;
    }
    
    .floating-cards {
        margin-top: 50px;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .conversations-list {
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(10px);
        padding: 12px 20px;
        justify-content: space-around;
        z-index: 100;
    }
    
    .nav-link span:not(.badge) {
        display: none;
    }
    
    .nav-link {
        padding: 12px;
    }
    
    .app-nav .nav-actions {
        gap: 4px;
    }

    .app-nav .btn-icon {
        width: 38px;
        height: 38px;
    }
    
    .tab-content {
        padding-bottom: 100px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .intent-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        padding: 20px;
    }
    
    .auth-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .landing-nav {
        padding: 16px;
    }
    
    .logo span {
        display: none;
    }
    
    .card-stack {
        height: 450px;
    }
    
    .swipe-actions {
        gap: 16px;
    }
    
    .action-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ========== Light Theme ========== */
.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.light-theme #landing-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.light-theme .landing-nav {
    background: rgba(255, 255, 255, 0.95);
}

.light-theme .logo {
    color: var(--dark);
}

.light-theme .landing-hero .hero-content h1 {
    color: var(--dark);
}

.light-theme .landing-hero .hero-content p {
    color: var(--dark-light);
}

.light-theme .tag {
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

.light-theme .app-nav {
    background: rgba(255, 255, 255, 0.95);
}

.light-theme .nav-link {
    color: var(--dark-light);
}

.light-theme .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.light-theme .nav-link.active {
    color: var(--white);
}

.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.light-theme .btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme .filter-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.light-theme .filter-btn:hover,
.light-theme .filter-btn.active {
    background: var(--gradient);
    color: var(--white);
}

.light-theme .matches-container h2,
.light-theme .admin-container h2 {
    color: var(--dark);
}

.light-theme .subtitle {
    color: var(--dark-light);
}

.light-theme .empty-state,
.light-theme .empty-card {
    color: var(--dark);
}

.light-theme .empty-state h3,
.light-theme .empty-card h3 {
    color: var(--dark);
}

.light-theme .empty-state p,
.light-theme .empty-card p {
    color: var(--dark-light);
}

.light-theme .empty-state i,
.light-theme .empty-card i {
    color: var(--gray);
}

.light-theme .loading {
    color: var(--dark);
}

/* ========== Admin Panel Styles ========== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h2 {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-header p {
    color: var(--gray);
}

.light-theme .admin-header h2 {
    color: var(--dark);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary);
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(2) i {
    color: var(--secondary);
    background: rgba(78, 205, 196, 0.1);
}

.stat-card:nth-child(3) i {
    color: var(--warning);
    background: rgba(243, 156, 18, 0.1);
}

.stat-card:nth-child(4) i {
    color: var(--success);
    background: rgba(39, 174, 96, 0.1);
}

.stat-info h3 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray);
    font-size: 14px;
}

.admin-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.admin-section h3 {
    color: var(--dark);
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.admin-table th {
    background: var(--gray-light);
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.admin-table td {
    color: var(--dark-light);
    font-size: 14px;
}

.admin-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-small i {
    color: var(--white);
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-sm {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    transform: scale(1.1);
}

.btn-sm.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.btn-sm.btn-danger:hover {
    background: var(--danger);
    color: var(--white);
}

.btn-sm.btn-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.btn-sm.btn-success:hover {
    background: var(--success);
    color: var(--white);
}

/* ========== Additional States ========== */
.loading-card,
.error-card,
.empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.loading-card i,
.error-card i,
.empty-card i {
    font-size: 60px;
    color: var(--gray);
    margin-bottom: 20px;
}

.loading-card p,
.error-card p,
.empty-card p {
    color: var(--gray);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: var(--gray);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--white);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.loading i {
    font-size: 24px;
    margin-right: 10px;
}

.empty-conversations {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-conversations i {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-conversations small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.unread-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
}

.conversation-item.unread .conversation-info h4 {
    font-weight: 700;
}

.conversation-item.unread .conversation-info p {
    color: var(--dark);
}

/* Swipe visual feedback */
.swipe-card.swiping-right::after {
    content: 'LIKE';
    position: absolute;
    top: 30px;
    left: 30px;
    padding: 8px 20px;
    border: 4px solid var(--success);
    color: var(--success);
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    transform: rotate(-15deg);
}

.swipe-card.swiping-left::after {
    content: 'NOPE';
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 8px 20px;
    border: 4px solid var(--danger);
    color: var(--danger);
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    transform: rotate(15deg);
}

.card-meta {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 8px;
}

.card-bio {
    color: var(--dark-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.online-status {
    color: var(--success) !important;
    font-size: 12px !important;
}

/* =====================================================================
   Additions: verification, feed, live chat, interests, safety, admin
   ===================================================================== */

.has-photo {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat;
}

.nav-link .badge,
.notification-dot {
    display: none;
}

.boot-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: var(--white);
}

.boot-screen > i {
    font-size: 28px;
    color: var(--gray);
}

.landing-footer {
    text-align: center;
    padding: 24px;
    color: var(--gray);
    font-size: 13px;
}

.center-card {
    text-align: center;
}

.big-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 32px;
}

.big-icon.danger {
    background: var(--danger);
}

.hint {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0 16px;
}

.spaced {
    margin-top: 12px;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: transparent;
    color: var(--gray);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.error {
    color: var(--danger);
    padding: 16px;
}

.loading.small {
    padding: 12px;
}

/* ---------- Notifications panel ---------- */
.notifications-panel {
    display: none;
    position: absolute;
    top: 70px;
    right: 5%;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
}

.notifications-panel.open {
    display: block;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark);
}

.notification-item {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--gray-light);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    color: var(--dark);
}

.notification-item:hover {
    background: var(--gray-light);
}

.notification-item.unread {
    background: rgba(255, 107, 107, 0.08);
}

.notification-item p {
    font-size: 13px;
    margin-bottom: 2px;
}

.notification-item p i {
    color: var(--primary);
    margin-right: 4px;
}

.notification-item small,
.empty-notifications {
    color: var(--gray);
    font-size: 12px;
}

.empty-notifications {
    padding: 24px;
    text-align: center;
}

/* ---------- Interests ---------- */
.interest-picker,
.interest-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-filter {
    align-items: center;
    margin: -16px 0 20px;
}

.interest-filter-label {
    color: var(--gray);
    font-size: 13px;
}

.interest-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--dark);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interest-chip:hover {
    border-color: var(--primary-light);
}

.interest-chip.selected {
    background: var(--gradient);
    border-color: transparent;
    color: var(--white);
}

.interest-chip.shared {
    background: rgba(78, 205, 196, 0.15);
    border-color: var(--secondary);
    color: #1f8a82;
    font-weight: 500;
}

.profile-form .form-section h3 small {
    color: var(--gray);
    font-weight: 400;
    font-size: 13px;
}

.card-interests .interest-chip {
    padding: 4px 12px;
    font-size: 12px;
}

.card-common {
    color: #1f8a82;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.card-menu-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: var(--white);
    cursor: pointer;
}

.card-menu-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.match-common {
    color: var(--secondary);
    font-weight: 500;
}

.match-common-small {
    color: #1f8a82 !important;
    font-size: 12px !important;
}

/* ---------- Dropdown menus ---------- */
.chat-menu {
    position: relative;
    margin-left: auto;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 170px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 50;
}

.dropdown.open {
    display: block;
}

.dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
}

.dropdown button:hover {
    background: var(--gray-light);
}

.dropdown button i {
    width: 16px;
    color: var(--gray);
}

/* ---------- Live chat ---------- */
.chat-header .btn-icon {
    background: transparent;
    color: var(--gray);
}

.chat-back {
    display: none !important;
}

.chat-input {
    margin: 0;
}

.typing-indicator {
    min-height: 18px;
    padding: 0 20px;
    font-size: 12px;
    color: var(--gray);
    font-style: italic;
}

.seen-indicator {
    align-self: flex-end;
    font-size: 11px;
    color: var(--gray);
    margin-top: -10px;
}

.message {
    word-wrap: break-word;
}

.message-text {
    white-space: pre-wrap;
}

@media (max-width: 992px) {
    .messages-container {
        height: auto;
    }

    .messages-container .chat-window {
        display: none;
        height: calc(100vh - 200px);
    }

    .messages-container.chat-open .chat-window {
        display: flex;
    }

    .messages-container.chat-open .conversations-list {
        display: none;
    }

    .chat-back {
        display: flex !important;
    }
}

/* ---------- Feed ---------- */
.feed-container {
    max-width: 640px;
    margin: 0 auto;
}

.composer,
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.composer-kinds {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.kind-btn {
    padding: 8px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-full);
    background: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
}

.kind-btn.active {
    background: var(--gradient);
    color: var(--white);
    border-color: transparent;
}

.composer textarea,
.composer-extra input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

.composer textarea:focus,
.composer-extra input:focus {
    border-color: var(--primary);
}

.composer-extra {
    display: none;
    gap: 10px;
    margin-top: 10px;
}

.composer-extra.show {
    display: flex;
}

.composer-preview {
    position: relative;
    margin-top: 10px;
}

.composer-preview img {
    max-width: 100%;
    max-height: 280px;
    border-radius: var(--radius-sm);
    display: block;
}

.remove-image {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    cursor: pointer;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.btn-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.feed-filter {
    margin-bottom: 20px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-header .conversation-avatar {
    width: 42px;
    height: 42px;
}

.post-author h4 {
    color: var(--dark);
    font-size: 14px;
}

.post-author span {
    color: var(--gray);
    font-size: 12px;
}

.post-event {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: rgba(78, 205, 196, 0.12);
    color: #1f8a82;
    font-size: 13px;
    font-weight: 500;
}

.post-event.market {
    background: rgba(255, 230, 109, 0.3);
    color: #8a6d00;
}

.post-event i {
    margin-right: 6px;
}

.post-text {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 12px;
}

.post-image {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.post-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--gray-light);
    padding-top: 10px;
}

.post-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--gray);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.post-actions button:hover {
    background: var(--gray-light);
}

.post-actions button.liked {
    color: var(--primary);
}

.post-comments {
    display: none;
    margin-top: 10px;
    border-top: 1px solid var(--gray-light);
    padding-top: 10px;
}

.post-comments.open {
    display: block;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 13px;
}

.comment-body {
    background: var(--gray-light);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    word-wrap: break-word;
}

.comment-body small {
    color: var(--gray);
    font-size: 11px;
}

.comment-input {
    display: flex;
    gap: 8px;
}

.comment-input input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.comment-input input:focus {
    border-color: var(--primary);
}

.comment-input button {
    width: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--white);
    cursor: pointer;
}

#feed-more {
    margin-bottom: 40px;
}

/* ---------- Report modal ---------- */
.report-modal-content {
    text-align: left;
    max-width: 460px;
}

.report-modal-content h2 {
    color: var(--dark);
    margin-bottom: 4px;
}

.report-modal-content select,
.report-modal-content textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.report-modal-content .match-actions {
    margin-top: 16px;
}

/* ---------- Profile extras ---------- */
.account-section {
    margin-top: 40px;
}

.blocked-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--dark);
    font-size: 14px;
}

.blocked-item span {
    flex: 1;
}

.account-links {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

/* ---------- Admin extras ---------- */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-item {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    color: var(--dark);
    font-size: 13px;
}

.report-main p {
    margin-bottom: 4px;
}

.report-details {
    color: var(--dark-light);
    font-style: italic;
}

.admin-inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-inline-form input {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

@media (max-width: 768px) {
    .composer-extra.show {
        flex-direction: column;
    }

    .notifications-panel {
        top: 64px;
        right: 12px;
    }

    .report-item {
        flex-direction: column;
    }
}

.light-theme .empty-state h3 {
    color: var(--dark);
}

.light-theme .boot-screen {
    color: var(--dark);
}

.card-menu-btn i {
    font-size: 14px !important;
    color: var(--white) !important;
}

.card-info {
    height: 40%;
    overflow-y: auto;
}

.card-info p {
    margin-bottom: 8px;
}

/* =====================================================================
   WhatsApp-style chat
   ===================================================================== */
:root {
    --wa-panel: #ffffff;
    --wa-header: #f0f2f5;
    --wa-bg: #efeae2;
    --wa-in: #ffffff;
    --wa-out: #d9fdd3;
    --wa-text: #111b21;
    --wa-sub: #667781;
    --wa-green: #00a884;
    --wa-border: #e9edef;
    --wa-blue: #53bdeb;
    --wa-hover: #f5f6f6;
}

body:not(.light-theme) {
    --wa-panel: #111b21;
    --wa-header: #202c33;
    --wa-bg: #0b141a;
    --wa-in: #202c33;
    --wa-out: #005c4b;
    --wa-text: #e9edef;
    --wa-sub: #8696a0;
    --wa-border: #222d34;
    --wa-hover: #202c33;
}

#messages-tab .messages-container {
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    grid-template-columns: 360px 1fr;
}

#messages-tab .conversations-list,
#messages-tab .chat-window {
    border-radius: 0;
    background: var(--wa-panel);
}

#messages-tab .conversations-list {
    border-right: 1px solid var(--wa-border);
    overflow-y: auto;
}

.wa-list-header {
    position: sticky;
    top: 0;
    background: var(--wa-panel);
    z-index: 2;
    padding: 16px 16px 8px;
}

.wa-list-header h2 {
    padding: 0 0 12px;
    border: none !important;
    color: var(--wa-text) !important;
    font-size: 22px;
}

.wa-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wa-header);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--wa-sub);
}

.wa-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 0;
    font-family: inherit;
    font-size: 14px;
    color: var(--wa-text);
    outline: none;
}

.wa-chat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 0 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.wa-chat-row:hover,
.wa-chat-row.active {
    background: var(--wa-hover);
}

.wa-avatar {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #dfe5e7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background-size: cover;
    background-position: center;
}

body:not(.light-theme) .wa-avatar {
    background-color: #6a7175;
}

.wa-avatar.small {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.wa-chat-main {
    flex: 1;
    min-width: 0;
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid var(--wa-border);
}

.wa-chat-top,
.wa-chat-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wa-name {
    color: var(--wa-text);
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-time {
    color: var(--wa-sub);
    font-size: 12px;
    flex-shrink: 0;
}

.wa-time.unread {
    color: var(--wa-green);
}

.wa-preview {
    color: var(--wa-sub);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.wa-preview.typing {
    color: var(--wa-green);
}

.wa-unread {
    background: var(--wa-green);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-no-results {
    text-align: center;
    padding: 20px;
}

#messages-tab .empty-conversations {
    color: var(--wa-sub);
}

.tick {
    font-size: 12px;
    letter-spacing: -3px;
    margin-right: 3px;
    color: var(--wa-sub);
}

.tick.read {
    color: var(--wa-blue);
}

.wa-meta .fa-clock {
    font-size: 10px;
    letter-spacing: 0;
}

.wa-placeholder {
    background: var(--wa-header);
    text-align: center;
    gap: 8px;
    padding: 20px;
}

.wa-placeholder h3 {
    color: var(--wa-text);
    font-weight: 400;
    font-size: 26px;
}

.wa-placeholder p,
.wa-placeholder small {
    color: var(--wa-sub);
}

.wa-placeholder small {
    margin-top: 24px;
}

.wa-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--wa-header);
    min-height: 60px;
}

.wa-header-info {
    flex: 1;
    min-width: 0;
}

.wa-header-info h4 {
    color: var(--wa-text);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-header-info p {
    color: var(--wa-sub);
    font-size: 13px;
}

.wa-header-info p.typing {
    color: var(--wa-green);
}

.wa-icon-btn {
    background: none;
    border: none;
    color: var(--wa-sub);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.wa-icon-btn:hover {
    background: rgba(134, 150, 160, 0.15);
}

.chat-back-btn {
    display: none;
}

.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 6% 8px;
    background-color: var(--wa-bg);
    background-image: radial-gradient(rgba(134, 150, 160, 0.12) 1px, transparent 1px);
    background-size: 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-system {
    align-self: center;
    background: var(--wa-header);
    color: #c79f3a;
    font-size: 12.5px;
    text-align: center;
    padding: 6px 12px;
    border-radius: 8px;
    max-width: 90%;
    margin: 6px 0;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

body:not(.light-theme) .wa-system {
    color: #ffd279;
}

.wa-day {
    display: flex;
    justify-content: center;
    margin: 10px 0 6px;
}

.wa-day span {
    background: var(--wa-header);
    color: var(--wa-sub);
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
    text-transform: uppercase;
}

.wa-row {
    display: flex;
}

.wa-row.out {
    justify-content: flex-end;
}

.wa-bubble {
    position: relative;
    max-width: 65%;
    padding: 6px 7px 8px 9px;
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 14.2px;
    line-height: 19px;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
    word-wrap: break-word;
    margin-top: 1px;
}

.wa-bubble.in {
    background: var(--wa-in);
}

.wa-bubble.out {
    background: var(--wa-out);
}

.wa-bubble.tail {
    margin-top: 8px;
}

.wa-bubble.tail.in {
    border-top-left-radius: 0;
}

.wa-bubble.tail.out {
    border-top-right-radius: 0;
}

.wa-bubble.tail.in::before,
.wa-bubble.tail.out::before {
    content: '';
    position: absolute;
    top: 0;
    width: 8px;
    height: 13px;
}

.wa-bubble.tail.in::before {
    left: -8px;
    background: linear-gradient(to bottom left, var(--wa-in) 50%, transparent 50%);
}

.wa-bubble.tail.out::before {
    right: -8px;
    background: linear-gradient(to bottom right, var(--wa-out) 50%, transparent 50%);
}

.wa-text {
    white-space: pre-wrap;
}

.wa-meta {
    float: right;
    margin: 6px 0 -5px 10px;
    font-size: 11px;
    color: var(--wa-sub);
    white-space: nowrap;
    line-height: 15px;
}

body:not(.light-theme) .wa-bubble.out .wa-meta,
body:not(.light-theme) .wa-bubble.out .tick:not(.read) {
    color: rgba(233, 237, 239, 0.6);
}

.wa-deleted {
    font-style: italic;
    color: var(--wa-sub);
}

.wa-photo {
    display: block;
    max-width: 100%;
    width: 280px;
    min-height: 120px;
    max-height: 340px;
    object-fit: cover;
    border-radius: 6px;
    margin: -3px -4px 4px -6px;
    width: calc(100% + 10px);
    cursor: zoom-in;
    background: rgba(134, 150, 160, 0.2);
}

.wa-bubble.photo-only {
    padding: 3px;
}

.wa-bubble.photo-only .wa-photo {
    margin: 0;
    width: 280px;
    max-width: 100%;
}

.wa-bubble.photo-only .wa-meta {
    position: absolute;
    right: 8px;
    bottom: 6px;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.wa-msg-menu {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--wa-out);
    color: var(--wa-sub);
    font-size: 11px;
    cursor: pointer;
    z-index: 1;
}

.wa-bubble:hover .wa-msg-menu {
    display: block;
}

.wa-typing-row {
    display: flex;
}

.typing-bubble {
    display: flex;
    gap: 4px;
    padding: 12px 14px !important;
    margin-top: 8px;
}

.typing-bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wa-sub);
    animation: wa-typing 1.2s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }

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

.wa-emoji-panel {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 2px;
    padding: 8px 12px;
    background: var(--wa-header);
    border-top: 1px solid var(--wa-border);
    max-height: 180px;
    overflow-y: auto;
}

.wa-emoji-panel.open {
    display: grid;
}

.wa-emoji-panel button {
    background: none;
    border: none;
    font-size: 24px;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
}

.wa-emoji-panel button:hover {
    background: rgba(134, 150, 160, 0.2);
}

.wa-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: var(--wa-header);
    margin: 0;
}

.wa-input-box {
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: var(--wa-panel);
    border-radius: 24px;
    padding: 2px 4px;
    min-height: 44px;
}

body:not(.light-theme) .wa-input-box {
    background: #2a3942;
}

.wa-input-box textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    padding: 11px 4px;
    font-family: inherit;
    font-size: 15px;
    line-height: 20px;
    color: var(--wa-text);
    outline: none;
    max-height: 120px;
}

.wa-input-box .wa-icon-btn {
    margin-bottom: 2px;
}

.wa-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--wa-green);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    flex-shrink: 0;
}

.wa-send:hover {
    filter: brightness(1.08);
}

#messages-tab .dropdown {
    background: var(--wa-header);
}

#messages-tab .dropdown button {
    color: var(--wa-text);
}

/* Full-screen photo viewer */
.photo-viewer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.photo-viewer.active {
    display: flex;
}

.photo-viewer img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
}

.photo-viewer button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.post-image {
    cursor: zoom-in;
    min-height: 120px;
    background: var(--gray-light);
}

/* Phones: chats list or one chat, full screen, like WhatsApp */
@media (max-width: 992px) {
    #messages-tab .messages-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 160px);
    }

    #messages-tab .conversations-list {
        border-right: none;
    }

    .chat-back-btn {
        display: inline-flex;
    }

    body.in-chat #messages-tab {
        padding: 0;
    }

    body.in-chat #messages-tab .messages-container {
        position: fixed;
        inset: 0;
        height: 100%;
        border-radius: 0;
        z-index: 150;
    }

    body.in-chat #messages-tab .chat-window {
        display: flex;
        height: 100%;
    }

    body.in-chat .app-nav .nav-links,
    body.in-chat .app-nav {
        display: none !important;
    }

    .wa-messages {
        padding: 10px 4% 6px;
    }

    .wa-bubble {
        max-width: 82%;
    }

    .wa-msg-menu {
        display: block;
        opacity: 0.6;
    }
}

/* =====================================================================
   Landing page sections, footer, brand
   ===================================================================== */
.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-block;
    vertical-align: middle;
}

.landing-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 5% 20px;
    color: var(--white);
    text-align: center;
}

.landing-section h2 {
    font-size: 34px;
    margin-bottom: 8px;
}

.section-lead {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 36px;
}

.steps-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: left;
}

.step-card,
.feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 26px;
}

.step-card i,
.feature-card i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 14px;
    display: block;
}

.step-card h3,
.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-card p,
.feature-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.6;
}

.step-num {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 40px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
}

.safety-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.16), rgba(255, 107, 107, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 40px;
    text-align: left;
}

.safety-box h2 i {
    color: var(--secondary);
}

.safety-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 30px;
    margin: 22px 0 26px;
}

.safety-list li {
    color: rgba(255, 255, 255, 0.85);
}

.safety-list i {
    color: var(--secondary);
    margin-right: 8px;
}

.safety-box .btn {
    margin-right: 10px;
    margin-top: 6px;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.faq {
    max-width: 760px;
    margin: 30px auto 0;
    text-align: left;
}

.faq details {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq summary::after {
    content: '+';
    float: right;
    color: var(--primary);
    font-size: 20px;
    line-height: 1;
}

.faq details[open] summary::after {
    content: '−';
}

.faq p {
    color: rgba(255, 255, 255, 0.75);
    margin-top: 10px;
    line-height: 1.6;
}

.cta-section {
    padding-bottom: 80px;
}

.cta-section h2 {
    margin-bottom: 24px;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 5% 30px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.site-footer .logo {
    color: var(--white);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    align-items: flex-start;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-note {
    width: 100%;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
}

.light-theme .landing-section,
.light-theme .site-footer .logo {
    color: var(--dark);
}

.light-theme .section-lead,
.light-theme .step-card p,
.light-theme .feature-card p,
.light-theme .faq p,
.light-theme .safety-list li,
.light-theme .site-footer,
.light-theme .footer-links a,
.light-theme .footer-note {
    color: #5d6d7e;
}

.light-theme .step-card,
.light-theme .feature-card,
.light-theme .faq details {
    background: var(--white);
    border-color: #e5e8eb;
}

.light-theme .safety-box .btn {
    color: var(--dark);
    border-color: #c7cdd3;
}

#contact-modal input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

@media (max-width: 860px) {
    .steps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .safety-list {
        grid-template-columns: 1fr;
    }

    .landing-section {
        padding-top: 56px;
    }

    .landing-section h2 {
        font-size: 26px;
    }

    .safety-box {
        padding: 26px;
    }
}

/* Small polish */
.filter-bar {
    scrollbar-width: none;
    flex-wrap: wrap;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.swipe-card .btn i,
.empty-card .btn i,
.empty-state .btn i {
    font-size: 14px !important;
    margin: 0 !important;
    opacity: 1 !important;
    color: inherit !important;
}

.empty-card .btn,
.error-card .btn {
    margin-top: 12px;
}
