:root {
    /* New refined color palette */
    --primary: #03847B;     /* Rich teal instead of standard blue */
    --primary-glow: rgba(3, 132, 123, 0.15);
    --secondary: #FF5E5E;   /* Slightly refined red */
    --accent: #5F2EEA;      /* Deep purple as accent */
    --dark-bg: #0A0E14;    /* Slightly less harsh black with subtle blue tint */
    --dark-surface: #121820; /* First tier surface */
    --dark-surface-2: #1A222C; /* Second tier surface */
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8); /* Better contrast */
    --text-tertiary: rgba(255, 255, 255, 0.6);  /* Better contrast */
    --border: rgba(255, 255, 255, 0.08);  /* Subtle dividers */
    
    /* System tokens */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.14), 0 3px 6px rgba(0, 0, 0, 0.1);
    
    /* Spacing system */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px; 
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    backdrop-filter: blur(8px);
    background: rgba(10, 14, 20, 0.85);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    left: -18px;
    box-shadow: 0 0 15px var(--primary-glow);
    animation: pulse 3s infinite;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

/* Main Content Styles */
main {
    padding-top: 5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tab Navigation */
.tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: var(--space-md);
    background: var(--dark-surface);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.tab {
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    position: relative;
    z-index: 10;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
}

.tab.active {
    color: var(--text);
}

.tab-highlight {
    position: absolute;
    background: var(--dark-surface-2);
    height: calc(100% - 10px);
    border-radius: var(--radius-sm);
    top: 5px;
    left: 5px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Content Sections */
.content-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Discover Tab */
.search-bar {
    position: relative;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar:focus-within {
    transform: scale(1.01);
}

.search-input {
    background: rgba(18, 24, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.5rem 1.1rem 3rem;
    width: 100%;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    letter-spacing: 0.01em;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(3, 132, 123, 0.2);
    outline: none;
    background: rgba(18, 24, 32, 0.85);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.search-bar:focus-within .search-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.search-results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(18, 24, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    max-height: 500px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.search-result-item {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.search-result-item:active {
    transform: translateY(0);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 120, 255, 0.2), rgba(123, 97, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-result-item:hover .search-result-icon {
    background: linear-gradient(135deg, rgba(0, 120, 255, 0.3), rgba(123, 97, 255, 0.3));
    transform: scale(1.05);
}

.search-result-image {
    position: absolute;
    right: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: all 0.4s ease;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.search-result-item:hover .search-result-image {
    opacity: 0.6;
    width: 120px;
}

.search-result-info {
    flex: 1;
    z-index: 1;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    letter-spacing: -0.01em;
    transition: all 0.25s ease;
    line-height: 1.3;
}

.search-result-item:hover .search-result-title {
    color: var(--primary);
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: calc(100% - 100px);
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.search-result-match {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 120, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.search-result-match.high-score {
    background: rgba(0, 120, 255, 0.2);
    color: white;
    box-shadow: 0 0 8px rgba(0, 120, 255, 0.3);
}

.search-result-match i {
    font-size: 0.7rem;
    color: #FFD700;
}

.destination-description {
    margin-bottom: 0.4rem;
    font-style: italic;
    opacity: 0.8;
}

.destination-region {
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.destination-region i {
    color: var(--primary);
}

.search-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-loading-text {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: 'Space Mono', monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
}

.search-loading-text:before {
    content: '>';
    opacity: 0.7;
}

.search-loading-progress {
    height: 4px;
    width: 300px;
    max-width: 80vw;
    background: rgba(3, 132, 123, 0.2);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 100px;
    animation: progressAnim 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(3, 132, 123, 0.4);
}

@keyframes progressAnim {
    0% { left: -30%; }
    100% { left: 100%; }
}

.search-loading-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-family: 'Space Mono', monospace;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.01em;
}

.search-loading-status:after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(3, 132, 123, 0.5);
}

.discover-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.map-container {
    background: var(--dark-surface);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#map {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/1000/563') center/cover;
    filter: grayscale(30%) contrast(120%) brightness(70%);
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.map-container.search-mode #map {
    opacity: 0.4; /* Reduce opacity when in search mode */
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(8, 8, 8, 0.8));
    pointer-events: all;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
}

.search-mode .map-overlay {
    opacity: 1;
    visibility: visible;
}

/* Add a slow spotlight animation to the map overlay */
.map-overlay::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at center, rgba(0, 120, 255, 0.1), transparent 20%);
    opacity: 0.5;
    animation: spotlight 15s infinite linear;
    pointer-events: none;
}

@keyframes spotlight {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20%, -20%) rotate(360deg); }
}

.destinations-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 20px;
    z-index: 20;
}

.search-results-container {
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background-color: rgba(18, 24, 32, 0.85);
    backdrop-filter: blur(12px);
    max-height: 260px;
    display: none; /* Initially hidden */
    box-shadow: var(--shadow-lg);
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 10;
}

.search-results-container.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

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

.section-title {
    color: white;
    font-size: 14px;
    margin: 0 0 16px 0;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

#search-destination-cards {
    display: flex;
    gap: 16px;
    padding-bottom: 10px;
    overflow-x: auto;
    -ms-overflow-style: none;  /* Hide scrollbar in IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar in Firefox */
    perspective: 1000px;
}

#search-destination-cards::-webkit-scrollbar {
    display: none;  /* Hide scrollbar in Chrome/Safari */
}

.destination-card {
    min-width: 230px;
    background: linear-gradient(145deg, rgba(26, 34, 44, 0.85), rgba(18, 24, 32, 0.85));
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transform-origin: center bottom;
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

.destination-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: rgba(3, 132, 123, 0.15);
}

.destination-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.destination-card.no-results {
    background: rgba(17, 17, 17, 0.7);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    min-height: 140px;
}

.destination-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.destination-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #0066e0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 120, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.destination-card-icon:after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 120, 255, 0.5), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.destination-card:hover .destination-card-icon {
    transform: scale(1.1);
}

.destination-card:hover .destination-card-icon:after {
    opacity: 1;
}

.destination-card-title {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.destination-card:hover .destination-card-title {
    color: var(--primary);
}

.destination-card-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.destination-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    margin-top: 6px;
}

.destination-card-stat {
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.destination-card-stat i {
    font-size: 10px;
    opacity: 0.9;
}

/* Enhanced search results styles */
.search-header {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-header-title i {
    color: var(--primary);
}

.search-query {
    font-weight: 400;
    background: rgba(0, 120, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 6px;
    font-size: 0.8rem;
    color: var(--primary);
}

.search-explanation {
    background: rgba(0, 120, 255, 0.05);
    border-left: 2px solid var(--primary);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.search-result-match {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 120, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.search-result-match.high-score {
    background: rgba(0, 120, 255, 0.2);
    color: white;
    box-shadow: 0 0 8px rgba(0, 120, 255, 0.3);
}

.search-result-match i {
    font-size: 0.7rem;
    color: #FFD700;
}

.confidence-score {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
}

.confidence-score.high {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.confidence-score.medium {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.confidence-score.low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.keyword-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.search-result-item.selecting {
    background: rgba(0, 120, 255, 0.1);
    transform: scale(0.98);
}

.search-result-item.no-results .search-result-description p {
    margin-bottom: 8px;
}

.search-result-item.no-results .suggestions {
    font-size: 0.8rem;
    opacity: 0.8;
}

.search-result-item.no-results .suggestions ul {
    padding-left: 16px;
    margin-top: 4px;
}

.search-result-item.no-results .suggestions li {
    margin-bottom: 4px;
}

.search-result-icon[data-region] {
    position: relative;
}

.search-result-icon[data-region]::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), transparent);
    opacity: 0.3;
    z-index: -1;
}

.search-result-icon[data-region="Asia"]::before {
    background: linear-gradient(135deg, #ff9900, transparent);
}

.search-result-icon[data-region="Europe"]::before {
    background: linear-gradient(135deg, #0066ff, transparent);
}

.search-result-icon[data-region="North America"]::before {
    background: linear-gradient(135deg, #ff0066, transparent);
}

.search-result-icon[data-region="South America"]::before {
    background: linear-gradient(135deg, #00cc99, transparent);
}

.search-result-icon[data-region="Africa"]::before {
    background: linear-gradient(135deg, #cc6600, transparent);
}

.search-result-icon[data-region="Oceania"]::before {
    background: linear-gradient(135deg, #6600cc, transparent);
}

.search-result-icon[data-region="Caribbean"]::before {
    background: linear-gradient(135deg, #0099ff, transparent);
}

.search-result-icon[data-region="Middle East"]::before {
    background: linear-gradient(135deg, #cc9900, transparent);
}

/* Loading animation styles */
.loading-command {
    position: relative;
    display: inline-block;
}

.loading-command::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 14px;
    background-color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.status-label {
    font-weight: 500;
    color: var(--primary);
}

.status-progress {
    background: rgba(0, 120, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Ripple effect for destination cards */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); /* Slightly more subtle */
    transform: scale(0);
    animation: ripple 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); /* Improved easing */
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Dynamic UI states */
.search-active .search-results-container.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animation for transitions */
.search-results-container,
.trending-container {
    transition: flex 0.4s ease;
}

.map-hotspots {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.2;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    cursor: pointer;
}

.hotspot::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.trending-list {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    overflow: auto;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    transition: transform 0.4s ease, max-width 0.4s ease;
}

.search-active .trending-list {
    width: 90%;
    transform: translateY(20px);
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.trending-item:hover {
    transform: translateX(5px);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-icon {
    font-size: 1.5rem;
    background: var(--dark-surface-2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 1rem;
    color: var(--primary);
}

.trending-info h4 {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.trending-info p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.destination-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.keyword-tag {
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.stat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat-badge {
    background: var(--dark-surface-2);
    border-radius: 100px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Connect Tab */
/* Connect Tab Styles */
.connect-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.connect-tabs {
    display: flex;
    gap: 1rem;
    background: var(--dark-surface);
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
}

.connect-tab {
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    position: relative;
    z-index: 10;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    border-radius: 8px;
}

.connect-tab.active {
    color: var(--text);
}

.connect-tab-highlight {
    position: absolute;
    background: var(--dark-surface-2);
    height: calc(100% - 10px);
    border-radius: 8px;
    top: 5px;
    left: 5px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.connect-content-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.connect-content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Location List */
.location-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.location-card {
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    height: 110px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.location-card:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(3, 132, 123, 0.1);
}

.location-image {
    width: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.location-card:hover .location-image img {
    transform: scale(1.05);
}

.location-info {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.location-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.traveler-count, .travel-dates {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.traveler-count i, .travel-dates i {
    color: var(--primary);
}

/* Location Detail Page */
.location-detail-page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    z-index: 100;
    padding: 2rem;
}

.location-detail-page.active {
    display: block;
    opacity: 1;
}

.location-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.back-button {
    background: var(--dark-surface);
    border: none;
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
    transition: background 0.2s ease;
}

.back-button:hover {
    background: var(--dark-surface-2);
}

.detail-location-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.travelers-graph {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
}

.travelers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.travelers-header h3 {
    margin: 0;
}

.travelers-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-item {
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-item:hover {
    background: var(--dark-surface-2);
}

.filter-item.active {
    background: var(--primary);
    color: white;
}

.travelers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Individual traveler card - will be used in location details */
.traveler-card {
    background: var(--dark-surface-2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.traveler-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.traveler-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.2rem;
    margin-right: 1rem;
}

.traveler-name {
    font-weight: 600;
}

.traveler-status {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.traveler-dates {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.traveler-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.traveler-interest {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    font-size: 0.8rem;
}

.connect-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.connect-btn:hover {
    background: #0066e0;
}

/* Community Tab */
.community-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.channels-list {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    height: calc(80vh - 8rem);
    overflow: auto;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.channel-item.active {
    background: var(--dark-surface-2);
}

.channel-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.channel-icon {
    color: var(--text-secondary);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.channel-name {
    font-weight: 500;
}

.channel-count {
    margin-left: auto;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

.chat-container {
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: calc(80vh - 8rem);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-md);
}

.chat-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-title {
    margin-bottom: 0;
}

.online-indicator {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    gap: 0.3rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 75%;
}

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

.message.sent {
    align-self: flex-end;
}

.message-content {
    background: var(--dark-surface-2);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-sm);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.message.sent .message-content {
    background: var(--primary);
    border-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(3, 132, 123, 0.2);
}

.message-sender {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    text-align: right;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    background: var(--dark-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.9rem 1.3rem;
    border-radius: 100px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(3, 132, 123, 0.1);
    background: rgba(26, 34, 44, 0.9);
}

.chat-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.chat-send:hover {
    background: #039e93;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(3, 132, 123, 0.2);
}

.camera-tool {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(3, 132, 123, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 1.3rem;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-tool:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 20px rgba(3, 132, 123, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Profile Overlay */
.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 20, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.profile-container {
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 900px;
    height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-overlay.active .profile-container {
    transform: translateY(0);
}

.profile-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header h2 {
    margin: 0;
}

.close-profile {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.close-profile:hover {
    background: var(--dark-surface-2);
    color: var(--text);
}

.profile-tabs-container {
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    position: relative;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-bottom: 1rem;
}

.profile-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.profile-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    position: relative;
    z-index: 10;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.profile-tab.active {
    color: var(--text);
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.profile-content-section {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.profile-content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Profile Form Styles */
.profile-form {
    max-width: 800px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
}

.change-avatar-btn {
    background: var(--dark-surface-2);
    border: none;
    color: var(--text);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.change-avatar-btn:hover {
    background: var(--primary);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, .form-textarea {
    width: 100%;
    background: var(--dark-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    letter-spacing: 0.01em;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(3, 132, 123, 0.15);
    background: rgba(26, 34, 44, 0.9);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: var(--dark-surface-2);
    border-radius: 8px;
    font-weight: 500;
}

.verification-status.verified {
    color: #4ade80;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.05);
    letter-spacing: 0.01em;
}

.save-btn:hover {
    background: #039e93;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Checkbox and Toggle Styles */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-text {
    position: relative;
    padding-left: 30px;
}

.checkbox-text:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--dark-surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text:before {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--dark-surface-2);
    border-radius: 24px;
    transition: .4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Interest Tags Editor */
.interest-tags-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem;
    background: var(--dark-surface-2);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.interest-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-tag {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.remove-tag:hover {
    opacity: 1;
}

.add-interest-input {
    flex: 1;
    min-width: 150px;
    border: none;
    background: none;
    color: var(--text);
    padding: 0.4rem;
    font-size: 0.85rem;
}

.add-interest-input:focus {
    outline: none;
}

/* Range Slider */
.range-slider-container {
    margin-top: 0.5rem;
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--dark-surface-2);
    border-radius: 5px;
    outline: none;
    margin-bottom: 1rem;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 120, 255, 0.5);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 120, 255, 0.5);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Connections Styles */
.connections-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--dark-surface-2);
    border-radius: 16px;
    padding: 1.5rem;
    flex: 1;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.connections-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.connections-search input {
    width: 100%;
    background: var(--dark-surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    padding-left: 2.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.connections-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.connections-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connection-item {
    background: var(--dark-surface-2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.connection-item:hover {
    transform: translateX(5px);
}

.connection-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.connection-info {
    flex: 1;
}

.connection-info h4 {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.connection-info p {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.connection-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connection-actions {
    display: flex;
    gap: 0.5rem;
}

.message-btn, .more-options-btn {
    background: var(--dark-surface);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

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

.more-options-btn:hover {
    background: var(--dark-surface-2);
    color: var(--text);
}

/* Invites Styles */
.invites-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.invites-section h3 {
    margin-bottom: 1rem;
}

.invites-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invite-item {
    background: var(--dark-surface-2);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1rem;
    position: relative;
}

.invite-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.invite-info {
    flex: 1;
}

.invite-info h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.invite-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.invite-message {
    background: var(--dark-surface);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-style: italic;
    color: var(--text-secondary);
}

.invite-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding-top: 0.5rem;
}

.invite-status.pending {
    color: #f59e0b;
}

.invite-status.accepted {
    color: #4ade80;
}

.invite-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.accept-btn, .decline-btn, .cancel-btn {
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

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

.accept-btn:hover {
    background: #0066e0;
}

.decline-btn, .cancel-btn {
    background: var(--dark-surface);
    color: var(--text-secondary);
}

.decline-btn:hover, .cancel-btn:hover {
    background: var(--secondary);
    color: white;
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(3, 132, 123, 0.4);
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(3, 132, 123, 0);
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(3, 132, 123, 0);
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .discover-grid {
        grid-template-columns: 1fr;
    }
    
    .community-container {
        grid-template-columns: 1fr;
    }
    
    .channels-list {
        height: auto;
        max-height: 300px;
    }
    
    .chat-container {
        height: 60vh;
    }
    
    .profile-container {
        width: 95%;
        height: 90vh;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .connections-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .invite-item {
        flex-direction: column;
    }
    
    .invite-actions {
        flex-direction: row;
        margin-top: 1rem;
    }
}

@media (max-width: 600px) {
    .connection-cards {
        grid-template-columns: 1fr;
    }
    
    .tabs, .connect-tabs, .profile-tabs {
        width: 90%;
    }
    
    .tab, .connect-tab, .profile-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .connection-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .connection-actions {
        align-self: flex-end;
        margin-top: -40px;
    }
}
/* Search-related CSS fixes */

/* Fix transition for trending list when search is active */
.search-active .trending-list {
    width: 90%;
    transform: translateX(30%) translateY(20px); /* Add horizontal movement */
    max-width: 500px; /* Reduce max-width to make space for search results */
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0.9;
}

/* Image Recognition UI Styles */
.image-recognition-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-recognition-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-recognition-container {
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.image-recognition-modal.active .image-recognition-container {
    transform: translateY(0);
}

.image-recognition-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-recognition-header h3 {
    margin: 0;
    color: var(--text);
}

.image-recognition-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.image-recognition-close:hover {
    background: var(--dark-surface-2);
    color: var(--text);
}

.image-recognition-body {
    padding: var(--space-lg);
}

.image-upload-area {
    background: var(--dark-surface-2);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--space-lg);
}

.image-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(3, 132, 123, 0.1);
}

.image-upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.image-upload-area p {
    margin: 0.5rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.image-upload-area p:first-of-type {
    font-weight: 500;
    color: var(--text);
}

.image-upload-area .upload-note {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: var(--space-md);
}

.image-preview-area {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.image-preview-area img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-md);
}

.remove-image-btn {
    background: var(--dark-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(255, 94, 94, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.image-description-area {
    margin-bottom: var(--space-lg);
}

.image-description-area label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.image-description-area textarea {
    width: 100%;
    background: var(--dark-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 100px;
    resize: vertical;
    transition: all 0.2s ease;
}

.image-description-area textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(3, 132, 123, 0.15);
}

.image-recognition-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}

.analyze-image-btn {
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.analyze-image-btn:disabled {
    background: rgba(3, 132, 123, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.analyze-image-btn:not(:disabled):hover {
    background: #039e93;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.image-recognition-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 24, 32, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(3, 132, 123, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-lg);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text);
    font-size: 1rem;
    text-align: center;
}

.image-recognition-results {
    padding: var(--space-lg);
}

.results-header {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h4 {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
}

.results-content {
    margin-bottom: var(--space-lg);
}

.results-summary {
    display: flex;
    margin-bottom: var(--space-lg);
    gap: var(--space-lg);
}

.results-image {
    flex: 0 0 200px;
}

.results-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.results-details {
    flex: 1;
}

.location-name {
    margin: 0 0 var(--space-sm) 0;
    font-size: 1.5rem;
    color: var(--text);
}

.confidence-level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

.confidence-label {
    font-weight: 500;
}

.confidence-level.high {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.confidence-level.medium {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.confidence-level.low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.location-region {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

.results-description {
    background: var(--dark-surface-2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.alternative-locations {
    margin-bottom: var(--space-lg);
}

.alternative-locations h5, .travel-tips h5 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.alternative-locations ul, .travel-tips ul {
    margin: 0;
    padding: 0 0 0 var(--space-lg);
    list-style-type: disc;
}

.alternative-locations li, .travel-tips li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.alt-name {
    font-weight: 500;
    color: var(--text);
}

.alt-region {
    margin-left: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.search-location-btn, .new-analysis-btn {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-location-btn {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm);
}

.search-location-btn:hover {
    background: #039e93;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.new-analysis-btn {
    background: var(--dark-surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.new-analysis-btn:hover {
    background: var(--dark-surface);
    color: var(--text);
    border-color: var(--text-tertiary);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark-surface-2);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-content {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Fix search results container positioning and visibility */
.search-results-container {
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    border-radius: 16px;
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(16px);
    max-height: 260px;
    display: none; /* Initially hidden */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transform: translateY(20px);
    opacity: 0;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 30; /* Increased z-index to ensure it appears above trending */
}

/* Ensure search results appear correctly when active */
.search-active .search-results-container.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Overall discover section layout improvements */
#discover.search-active {
    position: relative;
}

/* Adjust the discover grid to make space for search */
.search-active .discover-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Improve animation for search results visibility */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
