:root {
    --bg-dark: #0f172a;
    --accent-gold: #fbbf24;
    --accent-hover: #f59e0b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-height: 70px;
}

body {
    margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-light); background-color: var(--bg-dark);
    overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}

/* --- ANIMATED BACKGROUND & SYMBOLS --- */
.animated-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #020617, #1e1b4b);
    background-size: 400% 400%; animation: gradientBG 15s ease infinite; z-index: -2;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.floating-symbols {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: -1; overflow: hidden;
    opacity: 1; transition: opacity 0.6s ease;
}
.floating-symbols.hidden { opacity: 0; }

.symbol {
    position: absolute; color: #e2e8f0; 
    font-weight: bold; user-select: none;
    animation: drift var(--dur) linear infinite;
}
@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: var(--max-opacity); }
    90% { opacity: var(--max-opacity); }
    100% { transform: translate(var(--mx), var(--my)) rotate(var(--rot)); opacity: 0; }
}

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 0; width: 100%; height: var(--nav-height);
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(12px);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; box-sizing: border-box; border-bottom: 1px solid var(--glass-border); z-index: 1000;
}
.nav-title { 
    font-size: 24px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; 
    color: var(--accent-gold); cursor: pointer; transition: color 0.3s ease;
}
.nav-title:hover { color: #ffffff; }
.profile-btn { 
    background: transparent; border: 2px solid var(--accent-gold); color: var(--accent-gold); 
    padding: 8px 20px; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s;
}
.profile-btn:hover { background: var(--accent-gold); color: #ffffff; box-shadow: 0 0 15px rgba(251, 191, 36, 0.4); }

/* --- MAIN CONTENT & VIEWS --- */
.main-content {
    flex: 1; margin-top: var(--nav-height); display: flex; flex-direction: column; align-items: center;
    padding: 30px 20px; box-sizing: border-box; width: 100%;
}
.view-container { display: none; width: 100%; max-width: 1400px; animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.view-container.active { display: flex; flex-direction: column; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.page-header { display: flex; align-items: center; width: 100%; margin-bottom: 25px; gap: 20px; }
.header-buttons { display: flex; gap: 10px; }
.btn-back {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text-light);
    padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s;
    display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 14px;
}
.btn-back:hover { background: rgba(255,255,255,0.1); border-color: var(--text-light); }
.page-title { font-size: clamp(20px, 4vw, 24px); margin: 0; color: var(--accent-gold); }

/* --- LANDING PAGE (HERO) --- */
#view-home.active { flex: 1; justify-content: center; align-items: center; text-align: center; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; margin: 0 0 10px 0; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; color: transparent; z-index: 10;}
.hero-subtitle { font-size: clamp(1rem, 3vw, 1.25rem); color: var(--accent-gold); margin-bottom: 50px; letter-spacing: 3px; text-transform: uppercase; z-index: 10;}
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; z-index: 10;}
.btn-hero {
    background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--accent-gold);
    color: var(--text-light); padding: 18px 40px; font-size: 16px; font-weight: bold; border-radius: 50px;
    cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.btn-hero:hover { background: var(--accent-gold); color: var(--bg-dark); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3); }

/* --- GALLERY TOP BAR --- */
.top-category-bar {
    width: 100%; background: var(--glass-bg); backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px;
    margin-bottom: 25px; display: flex; gap: 10px;
    position: sticky; top: calc(var(--nav-height) + 15px); z-index: 100; box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.type-option {
    flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    padding: 12px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: 0.2s;
    color: var(--text-muted); text-align: center; font-weight: bold; letter-spacing: 0.5px;
}
.type-option.active { background: rgba(251, 191, 36, 0.15); color: var(--accent-gold); border-color: var(--accent-gold); }
.type-option:hover:not(.active) { background: rgba(255,255,255,0.05); color: var(--text-light); }

/* --- GALLERY GRID & LEFT FILTER PANE --- */
.gallery-wrapper { display: flex; gap: 30px; width: 100%; align-items: flex-start; }

.filter-pane {
    width: 280px; flex-shrink: 0; background: var(--glass-bg); backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px; box-sizing: border-box;
    position: sticky; top: calc(var(--nav-height) + 95px); max-height: calc(100vh - 180px); overflow-y: auto;
}
.filter-pane::-webkit-scrollbar { width: 4px; }
.filter-pane::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.filter-section { margin-bottom: 20px; }
.filter-title { font-size: 11px; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 10px; font-weight: bold; letter-spacing: 1px; }

.search-input, .dropdown-select {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    color: var(--text-light); padding: 10px; border-radius: 6px; box-sizing: border-box; font-family: inherit; font-size: 13px;
}
.search-input:focus, .dropdown-select:focus { outline: none; border-color: var(--accent-gold); }
.dropdown-select option { background-color: var(--bg-dark); color: var(--text-light); padding: 10px; }

.country-list-container { margin-top: 10px; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 5px; }
.country-list-container::-webkit-scrollbar { width: 4px; }
.country-list-container::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 2px; }
.country-item { font-size: 13px; padding: 6px 10px; border-radius: 4px; cursor: pointer; transition: 0.2s; color: var(--text-muted); }
.country-item:hover { background: rgba(255,255,255,0.05); color: var(--text-light); }
.country-item.active { background: var(--accent-gold); color: var(--bg-dark); font-weight: bold; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; flex: 1; align-content: start;}
.gallery-item {
    background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 15px; text-align: center; cursor: pointer; transition: 0.3s;
}
.gallery-item:hover { border-color: var(--accent-gold); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.gallery-item img { width: 100%; border-radius: 6px; margin-bottom: 12px; }
.gallery-item img.shape-note { aspect-ratio: 2 / 1; height: auto; object-fit: cover; }
.gallery-item img.shape-coin { aspect-ratio: 1 / 1; height: auto; object-fit: cover; }
.gallery-item h4 { margin: 0 0 6px 0; font-size: 14px; color: var(--text-light); line-height: 1.3;}
.gallery-item p { margin: 0; font-size: 11px; color: var(--accent-gold); font-weight: bold; }

/* --- TWO-COLUMN VIEWER CARD --- */
.viewer-wrapper { display: flex; justify-content: center; width: 100%; align-items: flex-start; }

.card { 
    background: #ffffff; width: 100%; max-width: 1000px; border-radius: 16px; padding: 30px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 0 4px var(--accent-gold); color: #1e293b; 
    display: flex; gap: 30px; box-sizing: border-box;
}

.card-left { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-right { flex: 1.2; display: flex; flex-direction: column; min-width: 0; }

.card-title { font-size: 24px; font-weight: 900; text-transform: uppercase; border-bottom: 3px solid var(--accent-gold); padding-bottom: 10px; margin-top: 0; margin-bottom: 20px; }

.image-container { display: flex; flex-direction: column; gap: 10px; }
.zoom-wrapper { overflow: hidden; border-radius: 8px; border: 1px solid #cbd5e1; position: relative; width: 100%; background: #f1f5f9; }
.zoom-wrapper img { width: 100%; display: block; transition: transform 0.1s ease; object-fit: cover; }
.zoom-wrapper:hover img { transform: scale(2.5); cursor: zoom-in; }
.image-label { text-align: center; font-size: 11px; font-weight: bold; color: #64748b; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px; }

.description { background: #f8fafc; padding: 15px; border-left: 4px solid #334155; font-size: 13px; line-height: 1.5; margin-bottom: 20px; font-style: italic; border-radius: 0 8px 8px 0; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid #e2e8f0; padding-top: 15px; margin-bottom: 20px; }
.detail-item { display: flex; flex-direction: column; }
.detail-label { font-size: 10px; color: #64748b; text-transform: uppercase; font-weight: bold; }
.detail-value { font-size: 14px; font-weight: 700; color: #0f172a; }
.full-width { grid-column: span 2; }

.interested-section { background: #f1f5f9; border-radius: 8px; padding: 15px; text-align: center; border: 2px dashed #cbd5e1; margin-bottom: 20px; }
.interested-section h4 { margin: 0 0 10px 0; font-size: 14px; text-transform: uppercase; color: #0f172a; }
.action-buttons { display: flex; gap: 10px; justify-content: center; }
.action-buttons button { flex: 1; padding: 10px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 13px; color: white; transition: 0.2s;}
.btn-wishlist { background: #ef4444; } .btn-wishlist:hover { background: #dc2626; }
.btn-contact { background: #0f172a; } .btn-contact:hover { background: #1e293b; }

.controls { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: auto; padding-top: 15px; border-top: 1px solid #e2e8f0; }
.icon-btn { background: #f8fafc; color: #0f172a; border: 1px solid #cbd5e1; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 13px;}
.icon-btn:hover { background: var(--accent-gold); border-color: var(--accent-gold); color: #fff; }
.icon-btn:disabled { border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; background: transparent; }
#card-counter { color: #64748b; font-weight: bold; font-size: 14px; }

.footer { width: 100%; background: rgba(15, 23, 42, 0.9); border-top: 1px solid var(--glass-border); text-align: center; padding: 20px; box-sizing: border-box; color: var(--text-muted); font-size: 13px; margin-top: auto;}
.footer span { color: var(--accent-gold); font-weight: bold; }

/* --- AUTH MODAL & PROFILE DROPDOWN --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px);
    display: none; justify-content: center; align-items: center; z-index: 2000;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--glass-bg); border: 1px solid var(--accent-gold);
    padding: 2.5rem 2rem; border-radius: 1rem; 
    width: 90%; max-width: 25rem; 
    min-height: 32rem; 
    position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); text-align: center;
    display: flex; flex-direction: column; 
}

.close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.close-btn:hover { color: var(--accent-gold); }

.modal-tabs { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
.tab-btn { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.tab-btn.active { color: var(--accent-gold); border-bottom: 2px solid var(--accent-gold); padding-bottom: 5px; }

.auth-input { width: 100%; margin-bottom: 15px; padding: 12px; font-size: 14px; box-sizing: border-box; }

.password-container { position: relative; width: 100%; margin-bottom: 15px; }
.password-container .auth-input { margin-bottom: 0; padding-right: 40px; }
.toggle-password { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; }
.toggle-password:hover { color: var(--accent-gold); }

.auth-rules { font-size: 11px; color: var(--text-muted); text-align: left; margin: 5px 0 15px 5px; display: none; }
.auth-switch-text { margin-top: auto; font-size: 0.85rem; color: var(--text-muted); padding-top: 1rem; }
.auth-switch-text span { color: var(--accent-gold); cursor: pointer; font-weight: bold; text-decoration: underline; }
#auth-message { color: #ef4444; font-size: 13px; margin-bottom: 15px; min-height: 18px; }

.auth-submit-btn {
    background: var(--accent-gold); color: var(--bg-dark); border: none;
    width: 100%; padding: 14px; font-size: 15px; font-weight: bold; border-radius: 6px;
    cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.auth-submit-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4); }

.profile-menu-container { position: relative; display: inline-block; }
.profile-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 15px);
    background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border);
    border-radius: 8px; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); flex-direction: column; overflow: hidden;
}
.profile-dropdown.active { display: flex; }
.profile-dropdown-item {
    padding: 12px 20px; color: var(--text-light); text-decoration: none; font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; text-align: left; transition: 0.2s;
}
.profile-dropdown-item:hover { background: rgba(251, 191, 36, 0.1); color: var(--accent-gold); }
.profile-dropdown-item:last-child { border-bottom: none; }

.inline-error { color: #ef4444; font-size: 11px; text-align: left; margin: -10px 0 10px 5px; min-height: 14px; display: block; }
.input-error { border-color: #ef4444 !important; box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }

/* --- PERSONAL DETAILS PROFILE --- */
.profile-wrapper { display: flex; justify-content: center; width: 100%; }
.profile-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 30px; width: 100%; max-width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; font-size: 11px; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 8px; font-weight: bold; letter-spacing: 1px; }
.profile-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); color: var(--text-light); padding: 12px; border-radius: 6px; box-sizing: border-box; font-family: inherit; font-size: 14px; transition: 0.2s;}
.profile-input:focus { outline: none; border-color: var(--accent-gold); }
.profile-input:disabled { opacity: 0.5; cursor: not-allowed; border-color: transparent; }

.btn-save { background: var(--accent-gold); color: var(--bg-dark); border: none; padding: 12px 24px; font-size: 14px; font-weight: bold; border-radius: 6px; cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px; width: 100%; margin-top: 10px; }
.btn-save:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4); }
#profile-msg { font-size: 13px; margin-top: 15px; min-height: 18px; text-align: center; }

/* New Layouts for Personal Details */
.phone-input-group { display: flex; gap: 10px; width: 100%; }
.phone-code { width: 35%; flex-shrink: 0; }
.date-input { color-scheme: dark; } 
.dob-input-group { display: flex; gap: 10px; width: 100%; }
.dob-part { flex: 1; padding-left: 8px; padding-right: 8px; } 

/* --- ADMIN DASHBOARD --- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; }
.admin-panel { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 25px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 14px; text-align: left;}
.admin-table th { border-bottom: 2px solid var(--accent-gold); padding: 12px; color: var(--accent-gold); text-transform: uppercase; font-size: 12px;}
.admin-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-light); }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.status-active { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid #10b981; }
.status-banned { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }
.btn-action { background: transparent; border: 1px solid var(--text-muted); color: var(--text-light); padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 12px; }
.btn-action:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.btn-ban { border-color: #ef4444; color: #ef4444; }
.btn-ban:hover { background: #ef4444; color: #fff; }

/* --- FULL MOBILE OPTIMIZATION OVERHAUL --- */
.mobile-filter-btn {
    display: none; width: 100%; padding: 12px; background: rgba(0,0,0,0.3);
    border: 1px solid var(--accent-gold); color: var(--accent-gold);
    border-radius: 8px; font-weight: bold; text-transform: uppercase;
    cursor: pointer; margin-bottom: 15px; text-align: center; font-size: 13px; transition: 0.2s;
}
.carousel-nav { display: none; }

@media (max-width: 800px) {
    .navbar { padding: 0 15px; }
    .nav-title { font-size: 18px; }
    .profile-btn { padding: 8px 15px; font-size: 12px; }
    .main-content { padding: 20px 10px; }

    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; gap: 15px; }
    .btn-hero { width: 100%; padding: 15px 20px; font-size: 14px; }

    .top-category-bar { flex-wrap: wrap; justify-content: space-between; gap: 5px; }
    .type-option { flex: 1 1 48%; font-size: 12px; padding: 10px 5px; }

    .carousel-item.mobile-hidden { display: none; }
    .image-container { position: relative; }
    .carousel-nav {
        display: block !important; position: absolute; top: 40%; transform: translateY(-50%);
        background: rgba(15, 23, 42, 0.85); color: var(--accent-gold); border: 1px solid var(--accent-gold);
        padding: 10px 14px; border-radius: 8px; font-size: 16px; z-index: 10; cursor: pointer;
    }
    .carousel-nav.left { left: 5px; }
    .carousel-nav.right { right: 5px; }
    
    .mobile-filter-btn { display: block; } 
    .gallery-wrapper { flex-direction: column; gap: 15px; }
    .filter-pane { 
        width: 100%; display: none; position: relative; top: 0; padding: 15px; 
        border-radius: 8px; border: 1px solid var(--accent-gold); max-height: none;
    }
    .filter-pane.mobile-active { display: block; animation: slideDown 0.3s ease; }
    
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; } 
    .gallery-item { padding: 10px; }
    .gallery-item img { margin-bottom: 8px; }
    .gallery-item h4 { font-size: 12px; }

    .card { flex-direction: column; padding: 15px; gap: 20px; border-radius: 12px; }
    .card-title { font-size: 20px; margin-bottom: 10px; }
    
    .details-grid { grid-template-columns: 1fr 1fr; gap: 12px; } 
    .full-width { grid-column: span 2; } 
    .detail-label { font-size: 9px; } 
    .detail-value { font-size: 13px; }
    
    .action-buttons { flex-direction: column; }

    .modal-content { padding: 2rem 1.5rem; width: 95%; min-height: auto; }
    .modal-tabs { gap: 10px; }
    .tab-btn { font-size: 14px; }

    .admin-panel { padding: 15px; }
    .admin-table th, .admin-table td { padding: 10px 8px; font-size: 12px; }
    .btn-action { padding: 4px 8px; font-size: 11px; }

    .profile-card { padding: 20px; box-sizing: border-box; }
    .btn-save { padding: 15px; font-size: 15px; }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Notification Dropdown Override */
.profile-dropdown-content { display: none; position: absolute; background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 2000; }
.profile-dropdown-content.active { display: block; }


/* Fallback box for missing images */
.no-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px; 
    width: 100%;
    background: rgba(0,0,0,0.3);
    color: var(--text-muted);
    font-size: 13px;
    border-radius: 6px;
    text-align: center;
    border: 1px dashed var(--glass-border);

/* Card-specific override for the fallback box */
.card .no-preview-box {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    height: 250px; /* Makes it a bit taller to fill the image space */
}
}