:root {
    --bg-color: #0f172a; /* Deep dark blue */
    --surface-color: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent-color: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --danger-color: #ef4444;
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--text-primary);
}

.strikethrough {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

#brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer; /* Secret click target */
    user-select: none;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
}

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

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-glow);
}

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

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

/* Grid for Products & Packs */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Cards (Glassmorphism) */
.card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.2);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-price-container {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.price-normal {
    font-size: 1rem;
}

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

.card-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: 1rem;
}

/* Custom Builder Layout */
.custom-builder h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.custom-builder .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.builder-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
}

.builder-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.builder-item {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.builder-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.builder-item-price {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 30px;
    padding: 0.25rem;
}

.qty-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed);
}

.qty-btn:hover {
    background: #2563eb;
}

.qty-btn:disabled {
    background: var(--surface-border);
    cursor: not-allowed;
}

.qty-value {
    flex-grow: 1;
    text-align: center;
    font-weight: 600;
}

/* Summary Panel */
.glass-panel {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 2rem;
}

.glass-panel h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.cart-items-list {
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.cart-item-name {
    color: var(--text-primary);
    flex-grow: 1;
}

.cart-item-qty {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.cart-item-price {
    font-weight: 600;
}

.empty-cart-msg {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

.summary-totals {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.total-row.highlight {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--surface-border);
}

#summary-pack-price {
    color: var(--accent-color);
}

.savings-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-color);
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modal for Seller Dashboard */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    transform: translateY(20px);
    transition: transform var(--transition-speed);
}

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

.seller-panel {
    border-color: rgba(239, 68, 68, 0.3); /* Reddish border to signify danger/secret */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

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

.modal-header h2 {
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.seller-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.stat-card h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-card span {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

#seller-min-price {
    color: #fbbf24; /* Yellow warning */
}

.seller-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 12px;
}

.seller-actions input {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--surface-border);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    width: 80px;
    font-family: inherit;
    text-align: center;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition-speed);
}

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

.btn.primary:hover {
    background: #2563eb;
}

.seller-warning {
    text-align: center;
    color: var(--danger-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Excel Export Button */
.excel-export-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #107c41; /* Microsoft Excel Green */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all var(--transition-speed);
    z-index: 100;
    border: 2px solid rgba(255,255,255,0.2);
}

.excel-export-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(16, 124, 65, 0.5);
    background: #149c52;
}
