:root {
    /* Premium Light Theme Palette */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);

    --primary: #4361ee;
    --primary-glow: rgba(67, 97, 238, 0.15);
    --secondary: #f72585;
    --accent: #4cc9f0;

    --text-pure: #1e293b;
    --text-muted: #64748b;
    --glass-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-pure);
    overflow-x: hidden;
    min-height: 100vh;
    direction: rtl;
    text-align: center;
    /* Global Centered Text */
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-main);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.02);
}

/* Header UI */
#app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px;
    padding-top: calc(10px + env(safe-area-inset-top)); /* أمان لمنطقة الساعة والكاميرا */
    background: linear-gradient(to bottom, var(--bg-main), transparent);
    backdrop-filter: blur(10px);
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-group img {
    height: 35px;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Details Page Styles */
.details-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.details-action-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}
.details-action-btn i {
    font-size: 1.2rem;
}

#rate-this-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #e0e7ff;
}

.brand .name {
    font-size: 1.2rem;
    font-weight: 900;
}

.brand .sub {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-pure);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Bottom Nav */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: calc(75px + env(safe-area-inset-bottom)); /* أمان لمكان السحب في هواتف الآيفون */
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-nav);
    backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    width: 20%;
}

.nav-item i {
    font-size: 1.3rem;
}

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

.main-add-btn {
    width: 55px;
    height: 55px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px var(--primary-glow);
    margin-top: -35px;
}

/* Views & Cards */
#view-container {
    flex: 1;
    padding: 10px 20px 100px 20px;
}

.listing-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--card-shadow);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.item-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
}

.item-info {
    flex: 1;
    overflow: hidden;
}

.item-info h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.call-btn {
    width: 40px;
    height: 40px;
    background: #2ecc71;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

/* Home Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.cat-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 25px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: 0.3s;
}

.cat-card:active {
    transform: scale(0.95);
}

.cat-icon-wrap {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.cat-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: flex-end;
}

.modal-overlay.active {
    display: flex;
}

body.has-ad-banner .modal-content,
body.is-native-mobile .modal-content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    background: var(--bg-nav);
    border-top: 1px solid var(--glass-border);
    border-radius: 25px 25px 0 0;
    padding: 25px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
    margin: 0 auto;
    transform: translateY(100%);
    transition: 0.3s;
}


.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--glass-border);
    border-radius: 5px;
    margin: -10px auto 20px;
}

.picker-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* Skeletons */
.s-card {
    height: 120px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.s-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Advanced Components */
.filter-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

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

.filter-chip {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}

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

.filter-chip.disabled {
    opacity: 0.4;
    cursor: default;
}

.sub-nav-wrapper {
    margin: 0 -20px 20px -20px;
    padding: 0 20px;
}

.sub-nav-strip {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.sub-nav-strip::-webkit-scrollbar {
    display: none;
}

.sub-chip {
    padding: 10px 20px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.sub-chip.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.search-container {
    margin-bottom: 20px;
}

/* Better Listing Cards */
/* Better Listing Cards */
.premium-search-box {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
    color: var(--text-pure);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: 0.3s;
    text-align: center;
}

.premium-search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-box-wrap i {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.listing-item-card {
    background: var(--bg-card);
    border-radius: 22px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.card-main {
    display: flex;
    padding: 15px;
    gap: 15px;
}

.item-visual {
    width: 75px;
    height: 75px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.item-content {
    flex: 1;
    text-align: right;
}

.cat-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.item-content h3 {
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: var(--text-pure);
}

.loc-info {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.loc-info i {
    margin-top: 3px;
    color: var(--secondary);
}

.item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Expanded Card Logic */
.more-info {
    max-height: 0;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    margin-top: 0;
}

.listing-item-card.expanded .more-info {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.listing-item-card.expanded .preview-text {
    display: none;
}

.more-info p {
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-pure);
}

.more-info p i {
    color: var(--primary);
    width: 14px;
    text-align: center;
}

.more-info b {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.preview-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.card-actions {
    display: flex;
    border-top: 1px solid var(--glass-border);
}

.action-btn {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-pure);
    transition: 0.2s;
}

.action-btn:first-child {
    border-left: 1px solid var(--glass-border);
}

.action-btn.call {
    color: #27ae60;
}

.action-btn.map {
    color: var(--primary);
}

.action-btn:active {
    background: rgba(0, 0, 0, 0.03);
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.sub-nav-wrapper {
    margin: 0 -20px 20px -20px;
    padding: 0 20px;
}


/* Wheel Picker (iOS Style) */
.wheel-picker-container {
    position: relative;
    height: 160px;
    margin: 15px 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), black 40%, black 60%, rgba(0, 0, 0, 0.1), transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), black 40%, black 60%, rgba(0, 0, 0, 0.1), transparent);
}

.wheel-scroll {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    padding: 60px 0;
}

.wheel-scroll::-webkit-scrollbar {
    display: none;
}

.wheel-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    scroll-snap-align: center;
    transition: 0.2s;
}

.wheel-item.selected {
    color: var(--primary);
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.viewfinder {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px;
    transform: translateY(-50%);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    pointer-events: none;
    z-index: 5;
    background: rgba(255, 255, 255, 0.02);
}

.wheel-confirm-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 900;
    font-size: 1rem;
    margin-top: 10px;
    box-shadow: 0 10px 20px var(--primary-glow);
}

/* ========================================= */
/* ====== FIREAPP IMPORTED NEW STYLES ====== */
/* ========================================= */

#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    width: 100%;
    height: calc(75px + env(safe-area-inset-top));
    display: block;
}

.header-top {
    height: 75px;
    margin-top: env(safe-area-inset-top);
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 20px;
    direction: rtl !important;
}

.header-left, .header-right { 
    display: flex !important; align-items: center !important; width: 85px;
}
.header-left { justify-content: flex-end; }
.header-right { justify-content: flex-start; }
.header-logo { width: 38px; height: 38px; object-fit: contain; }
.header-center { 
    flex: 1; text-align: center; font-size: 1.25rem; font-weight: 900; color: #1e293b;
}

#menu-toggle {
    width: 42px; height: 42px; border-radius: 50%; background: #f8fafc;
    display: flex; align-items: center; justify-content: center; color: #1e293b;
    font-size: 1.1rem; cursor: pointer; border: 1px solid #f1f5f9;
}

/* Home Page Components */
.search-section { padding: 15px 20px 25px; }
.search-container {
    background: #fff; display: flex; align-items: center; padding: 10px 15px;
    border-radius: 100px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); gap: 10px;
}
.search-icon-left { color: #94a3b8; font-size: 1.1rem; }
.search-container input {
    flex: 1; border: none; outline: none; font-family: inherit; font-size: 0.95rem; font-weight: 600; color: #1e293b;
    width: 50%; /* limit width to allow select */
}
.gov-select-wrap { position: relative; display: flex; align-items: center; }
.gov-select {
    background: #f1f5f9; border: none; outline: none; padding: 8px 12px 8px 30px;
    border-radius: 20px; font-family: inherit; font-size: 0.8rem; font-weight: 700;
    color: var(--primary); cursor: pointer; -webkit-appearance: none; appearance: none;
    max-width: 140px; text-overflow: ellipsis; white-space: nowrap; direction: rtl;
}
.gov-select-wrap i {
    position: absolute; left: 10px; font-size: 0.8rem; color: var(--primary); pointer-events: none;
}

.section-header { padding: 15px 25px 12px; display: flex; justify-content: space-between; align-items: center; }
.section-header h2 { font-size: 1.2rem; font-weight: 900; color: #1e293b; }

.featured-slider-wrap { width: 100%; overflow-x: auto; padding: 5px 20px 20px; scroll-snap-type: x mandatory; }
.featured-slider-wrap::-webkit-scrollbar { display: none; }
.featured-track { display: flex !important; flex-wrap: nowrap !important; gap: 20px; width: max-content; }
.featured-card {
    width: 280px; min-width: 280px; background: #fff; border-radius: 25px; overflow: hidden;
    box-shadow: 0 12px 35px rgba(0,0,0,0.07); scroll-snap-align: start;
}
.f-card-img { width: 100%; height: 160px; background-size: cover; background-position: center; background-repeat: no-repeat; display: block; }
.f-card-body { padding: 18px; }
.title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.title-row h3 { font-size: 1.05rem; font-weight: 900; color: #1e293b; }
.rating { font-size: 0.85rem; font-weight: 800; color: #fca311; }
.rating span { color: #94a3b8; font-weight: 600; }
.loc-row { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #64748b; font-weight: 700; margin-bottom: 10px; }
.snippet { font-size: 0.8rem; color: #94a3b8; line-height: 1.4; margin-bottom: 15px; }
.discover-link {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 900; color: var(--primary);
    text-decoration: none; font-size: 0.9rem;
}

.category-orb-wrap { width: 100%; overflow-x: auto; padding: 10px 20px 25px; margin-bottom: 10px; }
.category-orb-wrap::-webkit-scrollbar { display: none; }
.category-track { display: flex !important; flex-wrap: nowrap !important; gap: 25px; width: max-content; }
.cat-orb-item { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 65px; cursor: pointer; }
.cat-orb {
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; transition: 0.3s;
}
.cat-orb-label { font-size: 0.75rem; font-weight: 900; color: #475569; }

.updates-grid-container { padding: 10px 20px; margin-bottom: 30px; }
.updates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.update-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.u-card-img { width: 100%; height: 110px; background-size: cover; background-position: center; position: relative; }
.img-badge {
    position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,0.6); color: #fff;
    padding: 3px 10px; border-radius: 8px; font-size: 0.65rem; font-weight: 700;
}
.u-card-body { padding: 12px; }
.u-card-body h3 { 
    font-size: 0.9rem; font-weight: 900; color: #1e293b; line-height: 1.3; 
    margin-bottom: 8px; overflow: hidden; display: -webkit-box; 
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; 
}
.u-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 0.7rem; font-weight: 700; color: #94a3b8; }
.u-rating { color: #fca311; }
.u-snippet { font-size: 0.75rem; color: #94a3b8; line-height: 1.3; font-weight: 600; }

.contributors-track { width: 100%; overflow-x: auto; padding: 10px 20px 40px; display: flex; gap: 30px; }
.contributors-track::-webkit-scrollbar { display: none; }
.contributor-item { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.contributor-avatar-wrap { position: relative; }
.contributor-avatar-wrap img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.rank-badge {
    position: absolute; bottom: -5px; right: -5px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.contributor-info { display: flex; flex-direction: column; }
.c-name { font-size: 0.85rem; font-weight: 900; color: #1e293b; }
.c-pts { font-size: 0.75rem; color: #64748b; font-weight: 600; }

/* Drawer Styles */
.drawer {
    position: fixed; top: 0; right: -300px; width: 300px; height: 100%;
    background: #fff; z-index: 999999; transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.1); 
    display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px);
    z-index: 999998; opacity: 0; pointer-events: none; transition: 0.3s; display: block;
}
.overlay.active { opacity: 1; pointer-events: auto; }

.drawer-header {
    background: #f8fafc; padding: 60px 20px 30px; text-align: center; border-bottom: 1px solid #f1f5f9; position: relative;
    flex-shrink: 0;
}
.drawer-header img { width: 80px; margin-bottom: 15px; }
.drawer-header #close-drawer { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; color: #94a3b8; cursor: pointer; border: none; background: transparent; }

.drawer-menu { padding: 20px 10px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.drawer-menu::-webkit-scrollbar { display: none; }
.drawer-item {
    display: flex; align-items: center; gap: 18px; padding: 14px 20px;
    color: #475569; text-decoration: none; font-weight: 700; border-radius: 12px; margin-bottom: 5px;
}
.drawer-item i { font-size: 1.2rem; width: 25px; text-align: center; }
.drawer-item.active, .drawer-item:hover { background: #f1f5f9; color: var(--primary); }

/* Animation Utility */
.animate-in { opacity: 0; animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Rating System Styles */
.stars-display { display: flex; align-items: center; gap: 4px; color: #fca311; font-size: 0.85rem; font-weight: 700; margin: 5px 0; cursor: pointer; }
.stars-display i { font-size: 0.75rem; }
.stars-display span.count { color: #94a3b8; font-weight: 400; margin-right: 4px; }

.rating-modal-content { text-align: center; padding: 10px; }
.rating-modal-content h3 { font-size: 1.3rem; font-weight: 900; color: #1e293b; margin-bottom: 5px; }
.rating-modal-content p { color: #64748b; font-size: 0.9rem; font-weight: 700; }
.stars-selector { display: flex; justify-content: center; gap: 15px; margin: 25px 0; direction: ltr; }
.stars-selector i { font-size: 2.2rem; cursor: pointer; color: #ccc; transition: transform 0.2s; }
.stars-selector i:active { transform: scale(1.3); }

#rating-status { font-size: 1.1rem; color: var(--primary); font-weight: 900; min-height: 25px; }

/* Modern Card Styles */
.listing-modern-card {
    background: white;
    border-radius: 25px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: 0.3s;
    cursor: pointer;
}
.listing-modern-card:active { transform: scale(0.98); }
.m-card-header { position: relative; height: 160px; }
.m-thumb { width: 100%; height: 100%; object-fit: cover; }
.m-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,0.9); padding: 5px 12px;
    border-radius: 10px; font-weight: 900; font-size: 0.75rem; color: var(--primary);
    backdrop-filter: blur(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.m-card-body { padding: 15px 20px; }
.m-title { font-size: 1.1rem; font-weight: 900; color: #1e293b; margin-bottom: 8px; }
.m-loc, .m-desc { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 0.85rem; color: #64748b; font-weight: 700; }
.m-loc i { color: #ef4444; }
.m-rating { margin-bottom: 10px; }
.m-card-footer { padding: 0 15px 15px; }
.m-details-btn {
    width: 100%; padding: 12px; border: none; border-radius: 15px;
    background: #f1f5f9; color: var(--text-pure); font-weight: 900; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s;
}
.m-details-btn:hover { background: var(--primary); color: white; }

/* Details Page Styles */
.details-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.details-action-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}
.details-action-btn i {
    font-size: 1.2rem;
}

#rate-this-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #e0e7ff;
}

/* Floating Bottom Navigation */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    height: calc(70px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 99999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 800;
    transition: 0.3s;
    flex: 1;
}

.nav-item i {
    font-size: 1.3rem;
}

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

.nav-item.active i {
    transform: translateY(-2px);
}

@media (min-width: 501px) {
    #bottom-nav {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }
}
