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

:root {
    /* MMO Dark Theme Colors */
    --primary-color: #00d4ff;
    --secondary-color: #7c3aed;
    --accent-color: #ff006e;
    --success-color: #00ff88;
    --danger-color: #ff3366;
    --warning-color: #ffaa00;
    
    /* Dark Backgrounds */
    --bg-primary: #0a0e27;
    --bg-secondary: #141b2d;
    --bg-card: #1a2332;
    --bg-hover: #252f42;
    
    /* Text Colors - High Contrast */
    --text-primary: #f0f4ff;
    --text-secondary: #c7d2fe;
    --text-muted: #94a3b8;
    
    /* Borders & Shadows */
    --border-color: #2d3748;
    --border-glow: rgba(0, 212, 255, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 30px rgba(0, 212, 255, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.4);
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f3a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app-content {
    flex: 1;
    min-height: 0;
    padding-bottom: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    color: var(--text-primary);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem;
}

.nav-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.brand-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    transition: all 0.3s ease;
}

.brand-link:hover .logo-img {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    transform: scale(1.1);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: bold;
    white-space: nowrap;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.hamburger-menu:hover span {
    background: var(--text-primary);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.8);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link[style*="border-bottom"] {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.15);
}

.user-section, .auth-section {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    min-width: 40px;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.balance {
    font-weight: bold;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: var(--success-color);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b8e6, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--secondary-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00cc6f);
    color: var(--bg-primary);
    border: 1px solid var(--success-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00ff99, #00ff88);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-bottom: 1px solid var(--border-glow);
    color: var(--text-primary);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 400;
}

/* Products Section */
.products-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

/* Category Filter */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

/* Products List/Table */
.products-list-container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.products-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.products-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.products-table tbody tr:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    border-left: 3px solid var(--primary-color);
}

.products-table tbody tr:last-child {
    border-bottom: none;
}

.products-table td {
    padding: 1.2rem 1rem;
    vertical-align: middle;
    color: var(--text-primary);
}

.products-table tbody tr td:nth-child(2) strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.product-row {
    cursor: pointer;
}

.category-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.category-gmail {
    background: linear-gradient(135deg, #ea4335, #c5221f);
    color: white;
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.3);
}

.category-badge.category-x-account {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.category-badge.category-short-term-mail {
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.category-badge.category-trusted-mail {
    background: linear-gradient(135deg, var(--success-color), #00cc6f);
    color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
    font-weight: 700;
}

.product-name-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.product-name-cell strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.5;
}

.live-time-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning-color);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 170, 0, 0.2);
}

.stock-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

.stock-badge.out-of-stock {
    background: rgba(255, 51, 102, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(255, 51, 102, 0.3);
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.2);
}

.product-price-cell {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Transactions Section */
.transactions-section {
    padding: 3rem 0;
}

.transactions-table-container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    backdrop-filter: blur(10px);
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.transactions-table th {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.2));
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-glow);
}

.transactions-table tr:hover {
    background: var(--bg-hover);
    transform: translateX(3px);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.1);
}

.transaction-type {
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.transaction-type.deposit {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

.transaction-type.purchase {
    background: rgba(255, 51, 102, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(255, 51, 102, 0.3);
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.2);
}

/* Login Required Message */
.login-required-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.login-required-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: var(--shadow), 0 0 30px rgba(0, 212, 255, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.login-required-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-required-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-required-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-required-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.login-required-actions .btn {
    min-width: 150px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #f8d7da;
    border-radius: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: var(--success-color);
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #d4edda;
    border-radius: 5px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Purchase Product Info */
#purchaseProductInfo {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

#purchaseProductInfo h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

#purchaseProductInfo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 0.6rem 1rem;
    border: 2px solid var(--primary-color);
    background: var(--bg-card);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border-color);
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.pagination-ellipsis {
    padding: 0.6rem 0.5rem;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    background: var(--bg-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Quick Links Section */
.quick-links-section {
    padding: 3rem 0;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quick-link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(0, 212, 255, 0.2);
    border-color: var(--border-glow);
    background: var(--bg-hover);
}

.quick-link-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-link-card p {
    color: var(--text-secondary);
    flex-grow: 1;
}

.quick-link-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 1rem;
    align-self: flex-end;
}

/* Documentation Section */
.documentation-section, .api-docs-section {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.doc-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sidebar */
.doc-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.doc-sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.doc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-nav-link {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.doc-nav-link:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.doc-nav-link.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.doc-content {
    flex: 1;
    max-width: 900px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.api-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-primary);
}

.doc-section {
    margin-bottom: 3rem;
}

.doc-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.doc-card:hover {
    border-color: var(--border-glow);
    border-left-color: var(--primary-color);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    background: var(--bg-hover);
}

.doc-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.2rem;
}

.doc-card p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.doc-card ol, .doc-card ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.doc-card li {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.doc-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.doc-card a:hover {
    color: var(--success-color);
    border-bottom-color: var(--success-color);
}

/* API Documentation */
.api-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.api-section {
    margin-bottom: 3rem;
}

.api-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.api-endpoint {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method {
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.method.get {
    background: #61affe;
    color: white;
}

.method.post {
    background: #49cc90;
    color: white;
}

.endpoint-url {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.endpoint-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1rem;
}

.endpoint-details {
    margin-top: 1rem;
}

.endpoint-details h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.endpoint-details pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
}

.endpoint-details ul {
    margin-left: 1.5rem;
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}

.endpoint-details li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.endpoint-details code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.endpoint-details pre code {
    color: var(--text-primary);
    background: transparent;
    padding: 0;
}

.api-note {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid rgba(255, 170, 0, 0.4);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 3rem;
    backdrop-filter: blur(10px);
}

.api-note h3 {
    color: var(--warning-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.api-note p, .api-note ol, .api-note li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.api-note code {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.api-note ol {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.api-note li {
    margin-bottom: 0.5rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
    transform: translateX(0);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.toast.success {
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.toast.success::before {
    background: var(--success-color);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.toast.error {
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

.toast.error::before {
    background: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.toast.warning {
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.toast.warning::before {
    background: var(--warning-color);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

.toast.info {
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.toast.info::before {
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px currentColor);
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    opacity: 0.6;
}

.toast-close:hover {
    opacity: 1;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .products-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-brand {
        flex: 1;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem 2rem;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-left: 1px solid var(--border-glow);
        align-items: stretch;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-radius: 8px;
        font-size: 1rem;
        margin: 0;
    }

    .nav-link:hover {
        background: rgba(0, 212, 255, 0.15);
    }

    .nav-link:first-child {
        margin-top: 0;
    }

    .user-section, .auth-section {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .user-section .btn, .auth-section .btn {
        width: 100%;
    }

    .balance {
        width: 100%;
        text-align: left;
        padding: 0.5rem 0;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    /* Mobile Menu Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.active {
        display: block;
        opacity: 1;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-filter {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-btn {
        width: 100%;
    }

    .transactions-table-container {
        overflow-x: auto;
        padding: 1rem;
    }

    .transactions-table {
        font-size: 0.9rem;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 0.8rem 0.5rem;
    }

    .pagination {
        gap: 0.3rem;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 35px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
    }

    .products-list-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        margin: 0 -1rem;
    }

    .products-table {
        min-width: 700px;
        font-size: 0.85rem;
    }

    .products-table th,
    .products-table td {
        padding: 0.8rem 0.5rem;
        white-space: nowrap;
    }

    /* Hide less important columns on mobile */
    .products-table th:nth-child(3),
    .products-table td:nth-child(3) {
        display: none; /* Hide live time on mobile */
    }

    .transactions-table th:nth-child(5),
    .transactions-table td:nth-child(5) {
        display: none; /* Hide description on mobile */
    }

    .category-badge,
    .stock-badge,
    .live-time-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .product-price-cell {
        font-size: 1.1rem;
    }

    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 30px;
    }

    .products-list-container {
        padding: 0.5rem;
        margin: 0;
        border-radius: 10px;
    }

    .products-table {
        min-width: 600px;
        font-size: 0.8rem;
    }

    .products-table th,
    .products-table td {
        padding: 0.6rem 0.4rem;
    }

    .transactions-table-container {
        padding: 0.5rem;
        border-radius: 10px;
    }

    .transactions-table {
        min-width: 500px;
        font-size: 0.8rem;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 0.6rem 0.4rem;
    }

    /* Hide more columns on very small screens */
    .products-table th:nth-child(1),
    .products-table td:nth-child(1) {
        display: none; /* Hide category on very small screens */
    }

    .transactions-table th:nth-child(2),
    .transactions-table td:nth-child(2) {
        display: none; /* Hide type on very small screens */
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .nav-brand h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .products-section {
        padding: 2rem 0;
    }

    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 30px;
    }

    .pagination-info {
        font-size: 0.8rem;
    }

    .product-info-item {
        flex-direction: column;
        gap: 0.3rem;
    }

    .product-info-label,
    .product-info-value {
        width: 100%;
    }

    .features-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .doc-card,
    .api-endpoint {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .endpoint-details pre {
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    .doc-container {
        flex-direction: column;
    }

    .doc-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }

    .doc-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .doc-nav-link {
        text-align: center;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .doc-nav-link:hover,
    .doc-nav-link.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .terms-container {
        padding: 1.5rem;
    }

    .terms-title {
        font-size: 2rem;
    }
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-glow);
    color: var(--text-primary);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
    width: 100%;
    clear: both;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Terms of Service Page Styles */
.terms-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.terms-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.terms-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.terms-content {
    color: var(--text-primary);
    line-height: 1.8;
}

.terms-item {
    margin-bottom: 3rem;
}

.terms-item:last-child {
    margin-bottom: 0;
}

.terms-item h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-glow);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.terms-item h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.terms-item p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.terms-item p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.terms-item ul {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.terms-item ul li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.terms-item ul li::marker {
    color: var(--primary-color);
}

/* Responsive adjustments for Terms page */
@media (max-width: 768px) {
    .terms-container {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .terms-title {
        font-size: 2rem;
    }

    .terms-item h2 {
        font-size: 1.5rem;
    }

    .terms-item h3 {
        font-size: 1.1rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

