/* ========================================
   DOTZIM - Style System
   ======================================== */

/* Base & Fonts */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
}

/* ========================================
   THEME SYSTEM
   ======================================== */
.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f1f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.9);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.15);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --search-bg: rgba(255, 255, 255, 0.95);
    --modal-bg: #ffffff;
    --input-bg: #f3f4f6;
    --input-border: #e5e7eb;
    --chip-bg: #f3f4f6;
    --chip-active-bg: #111827;
    --chip-active-text: #ffffff;
    --star-color: #eab308;
    --overlay: rgba(0, 0, 0, 0.5);
}
.dark-theme {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-card-hover: rgba(34, 34, 50, 0.9);
    --bg-glass: rgba(26, 26, 37, 0.6);
    --bg-glass-strong: rgba(26, 26, 37, 0.95);
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3b0;
    --text-tertiary: #6b7280;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.2);
    --navbar-bg: rgba(10, 10, 15, 0.9);
    --search-bg: rgba(17, 17, 24, 0.95);
    --modal-bg: #111118;
    --input-bg: #1a1a25;
    --input-border: rgba(255, 255, 255, 0.1);
    --chip-bg: rgba(255, 255, 255, 0.08);
    --chip-active-bg: linear-gradient(135deg, #22c55e, #eab308);
    --chip-active-text: #000000;
    --star-color: #eab308;
    --overlay: rgba(0, 0, 0, 0.7);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ========================================
   NAVBAR
   ======================================== */
#navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.brand-text { color: var(--text-primary); }
.nav-tab {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}
.nav-tab:hover { color: var(--text-primary); background: var(--chip-bg); }
.nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #eab308);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
}
.mobile-nav-tab {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}
.mobile-nav-tab:hover, .mobile-nav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #eab308);
}
.theme-toggle-btn {
    position: relative;
    color: var(--text-primary);
    background: var(--chip-bg);
    border: 1px solid var(--border-color);
}
.light-theme .moon-icon { display: none; }
.light-theme .sun-icon { display: block; }
.dark-theme .moon-icon { display: block; }
.dark-theme .sun-icon { display: none; }

/* ========================================
   SEARCH & FILTERS
   ======================================== */
#search-section {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.search-bar-inner {
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    transition: all 0.3s ease;
}
.search-bar-inner:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.search-input {
    color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-tertiary); }
.filter-toggle-btn { color: var(--text-secondary); }
.filter-toggle-btn:hover { color: var(--text-primary); }
.filter-panel {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 8px;
}
.filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--chip-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.filter-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.filter-chip.active {
    background: linear-gradient(135deg, #22c55e, #eab308);
    color: #000;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* ========================================
   CARDS
   ======================================== */
.listing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(34, 197, 94, 0.3);
}
.listing-card:hover .card-image img {
    transform: scale(1.06);
}
.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(0,0,0,0.6);
    color: #fff;
    backdrop-filter: blur(10px);
}
.card-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}
.card-favorite:hover { transform: scale(1.15); background: #fff; }
.card-favorite.liked { color: #ef4444; }
.card-favorite.liked i { fill: #ef4444; }
.card-body { padding: 16px; }
.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}
.card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    line-height: 1.5;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-rating .stars { color: var(--star-color); display: flex; gap: 1px; }
.card-price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.card-tag {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--chip-bg);
    color: var(--text-secondary);
}
.card-tag.highlight {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #22c55e, #eab308, #ef4444);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
}
.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.25) 100%);
}
.hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(234, 179, 8, 0.3);
    filter: blur(100px);
    animation: glowPulse 4s ease infinite;
}
@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.6; }
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px 20px;
    max-width: 700px;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    margin-bottom: 12px;
    line-height: 1.1;
}
.hero-content p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

/* ========================================
   CATEGORY SHORTCUTS
   ======================================== */
.category-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.category-shortcut:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #22c55e;
}
.category-shortcut .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.category-shortcut:hover .icon-wrap { transform: scale(1.1); }
.category-shortcut span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}
.category-shortcut .count {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}
.section-header a, .section-header button {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #22c55e;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}
.section-header a:hover, .section-header button:hover { color: #16a34a; }

/* ========================================
   MODAL STYLES
   ======================================== */
.modal-slide-in {
    background: var(--modal-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
}
.modal-fade-in {
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    animation: modalFade 0.3s ease;
}
@keyframes modalFade {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.detail-modal-content { animation: slideInRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ========================================
   DETAIL VIEW
   ======================================== */
.detail-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--chip-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-primary);
}
.detail-close-btn:hover { background: var(--bg-tertiary); transform: scale(1.1); }
.detail-gallery {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px;
    background: var(--bg-tertiary);
}
.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.gallery-nav:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}
.gallery-dot.active { background: #fff; width: 24px; border-radius: 4px; }
.comm-channel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--chip-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}
.comm-channel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.25s;
    outline: none;
}
.form-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.form-input::placeholder { color: var(--text-tertiary); }
textarea.form-input { min-height: 80px; resize: vertical; }
select.form-input { cursor: pointer; }
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--input-bg);
}
.image-upload-area:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}
.image-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.image-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}
.star-rating-input { display: flex; gap: 4px; }
.star-rating-input button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.15s;
    padding: 0;
}
.star-rating-input button.active { color: var(--star-color); }
.star-rating-input button:hover { color: var(--star-color); }

/* ========================================
   REVIEW STYLES
   ======================================== */
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #eab308);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

/* ========================================
   TOAST
   ======================================== */
.toast {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.6s forwards;
    backdrop-filter: blur(20px);
}
.toast.success { border-left: 4px solid #22c55e; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info { border-left: 4px solid #3b82f6; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */
.page-enter { animation: pageEnter 0.4s ease; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   PROFILE CARD
   ======================================== */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.profile-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ========================================
   MISC
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, #22c55e, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.btn-primary {
    background: linear-gradient(135deg, #22c55e, #eab308);
    color: #000;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(34,197,94,0.4); }
.btn-secondary {
    background: var(--chip-bg);
    color: var(--text-primary);
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}
.btn-secondary:hover { background: var(--bg-tertiary); }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}
.empty-state i { margin-bottom: 16px; opacity: 0.4; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.25rem; }
    .hero-content p { font-size: 0.9375rem; }
    .hero-section { min-height: 400px; }
    .detail-modal-content { max-width: 100%; }
    #search-section { display: block; }
}