@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --background: #0d1321;
    --foreground: #f8fafc;
    --card: #111827;
    --card-foreground: #f8fafc;
    --popover: #111827;
    --popover-foreground: #f8fafc;
    --primary: #FF3366;
    --primary-foreground: #ffffff;
    --secondary: #2563eb;
    --secondary-foreground: #ffffff;
    --muted: #1f2937;
    --muted-foreground: #94a3b8;
    --accent: #9333ea;
    --accent-foreground: #ffffff;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #374151;
    --input: #374151;
    --ring: #FF3366;
    --radius: 1rem;

    --tm-pink: #FF3366;
    --tm-purple: #9333ea;
    --tm-blue: #2563eb;
    --tm-cyan: #06b6d4;
    --tm-surface: #111827;

    --bg-gradient-start: #0d1321;
    --bg-gradient-end: #050811;
}

[data-theme="light"] {
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --popover: #ffffff;
    --popover-foreground: #0f172a;
    --primary: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #2563eb;
    --accent-foreground: #ffffff;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #2563eb;
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: var(--border);
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Glassmorphism */
.glass {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.08);
}

/* Gradients */
.gradient-pink-purple {
    background: linear-gradient(135deg, var(--tm-pink) 0%, var(--tm-purple) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--tm-pink) 0%, var(--tm-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-radius: 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--foreground);
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    background: radial-gradient(circle at 25% 25%, #22c55e, #0ea5e9);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--foreground);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: var(--muted);
}

/* Hero Section */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 51, 102, 0.1);
    color: var(--tm-pink);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Background Animation Placeholder */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1f3c 0%, #050811 100%);
    overflow: hidden;
}

/* Bottom Nav (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--tm-pink);
}

/* V1 Return Button */
#return-v1 {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Marketplace V2 Layout */
.content-container {
    padding-top: 6rem;
    padding-bottom: 5rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

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

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

.market-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .market-grid {
        grid-template-columns: 380px 1fr;
    }
}

/* User Sidebar */
.user-sidebar {
    border-radius: 1.5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 12rem);
}

.sidebar-header {
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.online-count {
    font-size: 0.75rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.chip {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background: var(--muted);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    color: var(--muted-foreground);
    transition: all 0.2s;
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.user-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Premium User Card */
.premium-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.premium-user-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.premium-user-card.selected {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--tm-pink);
}

.card-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    background: var(--muted);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid var(--card);
}

.status-indicator.online {
    background: #10b981;
}

.status-indicator.offline {
    background: #6b7280;
}

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

.card-info h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Detail Panel */
.detail-panel {
    border-radius: 1.5rem;
    height: calc(100vh - 12rem);
}

.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.detail-header {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.suitcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

/* Suitcase Item */
.suitcase-item {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.suitcase-item:hover {
    transform: translateY(-4px);
}

.item-thumb {
    width: 100%;
    aspect-ratio: 1;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.item-info {
    padding: 0.75rem;
}

.item-info h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #10b981;
}

/* Profie Card refinements */
.profile-card {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 1.5rem;
    overflow: hidden;
}

.profile-banner {
    height: 100px;
}

.profile-info {
    padding: 2rem;
    text-align: center;
    position: relative;
    margin-top: -50px;
}

.profile-avatar-large {
    width: 6rem;
    height: 6rem;
    border-radius: 1.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    border: 4px solid var(--card);
}

.profile-menu {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--foreground);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.danger {
    color: #ef4444;
}

/* Utility Hidden */
.hidden {
    display: none;
}

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

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