/* Core Design System & Tokens */
:root {
    --bg-main: #0a0b0d;
    --bg-card: #121418;
    --bg-sidebar: #0f1013;
    --border-color: rgba(255, 255, 255, 0.05);
    
    /* Neon Theme Colors */
    --accent: #00ff66;
    --accent-glow: rgba(0, 255, 102, 0.15);
    --accent-hover: #00e65c;
    
    /* Security Mode Colors */
    --danger: #ff3b30;
    --danger-glow: rgba(255, 59, 48, 0.15);
    --success: #34c759;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8e9297;
    --text-muted: #4e5058;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    position: relative;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent));
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--accent);
    filter: blur(40px);
    opacity: 0.3;
    left: -10px;
    top: -10px;
    pointer-events: none;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--accent);
    background-color: var(--accent-glow);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding-left: calc(1.25rem - 3px);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

/* Main Content Area */
.main-content {
    padding: 2rem 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 2rem;
}

.header-search {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.header-search input:focus {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Toggle Switch Styling */
.security-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 59, 48, 0.06);
    border: 1px solid rgba(255, 59, 48, 0.15);
    padding: 0.6rem 1rem;
    border-radius: 30px;
    transition: var(--transition-smooth);
}

.security-toggle-container.secure-mode {
    background-color: rgba(0, 255, 102, 0.06);
    border: 1px solid rgba(0, 255, 102, 0.15);
}

.security-toggle-container.secure-mode .toggle-label {
    color: var(--accent);
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ff3b30;
    transition: .3s;
    border-radius: 34px;
}

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

input:checked + .slider {
    background-color: #00ff66;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.cart-btn {
    width: 48px;
    height: 48px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Security Explanation Banner */
.security-banner {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.banner-icon {
    font-size: 1.5rem;
    color: var(--danger);
    padding-top: 2px;
}

.banner-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #ff453a;
}

.banner-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.close-banner-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.close-banner-btn:hover {
    color: var(--text-primary);
}

/* Categories Section */
.categories-section {
    margin-bottom: 2.5rem;
}

.categories-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
}

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.custom-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

/* Product Card */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.02);
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.badge-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    z-index: 2;
}

.badge-tag.hot {
    border-color: rgba(255, 59, 48, 0.4);
    color: #ff453a;
}

.badge-tag.fivem {
    border-color: rgba(0, 255, 102, 0.4);
    color: var(--accent);
}

.card-favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2;
}

.card-favorite-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-main);
}

/* Card Body */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.meta-category {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-rating {
    color: #ffb800;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.meta-rating span {
    color: var(--text-secondary);
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

/* Features list inside card */
.card-features {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.card-features li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-features li i {
    color: var(--accent);
    font-size: 0.75rem;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.price-container {
    display: flex;
    flex-direction: column;
}

.original-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 0.1rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.btn-buy-card {
    background-color: var(--text-primary);
    color: var(--bg-main);
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-buy-card:hover {
    background-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-product-summary {
    display: flex;
    gap: 1.25rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.modal-product-summary img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.modal-product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-product-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.price-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

/* Tamper/Exploitation Box */
.tamper-box {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.08) 0%, rgba(255, 59, 48, 0.02) 100%);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: none; /* Controlled dynamically */
}

.tamper-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tamper-header h5 {
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tamper-body label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.hacked-price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hacked-price-input-wrapper input {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--danger);
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    outline: none;
}

.hacked-badge {
    position: absolute;
    right: 1rem;
    background-color: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.tamper-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Payment Selector */
.payment-method-selector h5 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.payment-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.payment-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.payment-card.active {
    border-color: var(--accent);
    background-color: var(--accent-glow);
}

.payment-card i {
    font-size: 1.25rem;
}

.payment-card span {
    font-size: 0.75rem;
    font-weight: 600;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-cancel {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-cancel:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-pay {
    background-color: var(--accent);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: var(--transition-smooth);
}

.btn-pay:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(0, 255, 102, 0.3);
}

/* Toast Notification */
.notification-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.notification-toast.active {
    transform: translateY(0);
}

.notification-toast.hacked {
    border-color: rgba(255, 59, 48, 0.3);
    box-shadow: 0 10px 30px rgba(255, 59, 48, 0.15);
}

.toast-icon {
    font-size: 1.5rem;
    color: var(--success);
}

.notification-toast.hacked .toast-icon {
    color: var(--danger);
}

.toast-content h5 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Skeleton loader for cards */
.skeleton-card {
    height: 380px;
    background: linear-gradient(90deg, #121418 25%, #1b1e24 50%, #121418 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* Simplified for desktop preview */
    }
    .main-content {
        padding: 1.5rem;
    }
}
