/* Book Swap Squad - Stylesheet */
/* Fun, colorful, kid-friendly design */

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary: #F59E0B;
    --secondary-light: #FCD34D;
    --accent: #10B981;
    --accent-light: #6EE7B7;
    --danger: #EF4444;
    --danger-light: #FCA5A5;
    --bg: #F0F4FF;
    --bg-card: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
    --shadow-lg: 0 8px 40px rgba(79, 70, 229, 0.12);
    --font-body: 'Nunito', sans-serif;
    --font-display: 'Fredoka One', cursive;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Navigation */
.main-nav {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 58px;
    width: 58px;
    object-fit: contain;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--bg);
    color: var(--primary);
}

.nav-logout {
    color: var(--danger) !important;
}

.bsc-badge {
    background: linear-gradient(135deg, var(--secondary), #F97316);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: 700;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: calc(100vh - 150px);
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

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

.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: 0.6; }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--bg);
    color: var(--primary);
    border: 2px solid var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--primary); }

.btn-success {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); color: white; }

.btn-warning {
    background: linear-gradient(135deg, var(--secondary), #D97706);
    color: white;
}
.btn-warning:hover { transform: translateY(-1px); color: white; }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
}
.btn-danger:hover { transform: translateY(-1px); color: white; }

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Hero Section (Public) */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899);
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
                radial-gradient(circle at 60% 80%, rgba(255,255,255,0.05) 0%, transparent 45%);
    pointer-events: none;
}

.hero-logo {
    height: 150px;
    width: 150px;
    margin: 0 auto 16px;
    position: relative;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    padding: 10px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 50px;
}

.btn-white {
    background: white;
    color: var(--primary);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); color: var(--primary); }

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: white; }

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-family: var(--font-display);
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Auth Pages */
.auth-container {
    max-width: 480px;
    margin: 40px auto;
}

.auth-container .card {
    padding: 36px;
}

.auth-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

/* Verification Code Input */
.code-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Dashboard Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dash-stat {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border-bottom: 4px solid var(--primary);
}

.dash-stat.gold { border-bottom-color: var(--secondary); }
.dash-stat.green { border-bottom-color: var(--accent); }
.dash-stat.red { border-bottom-color: var(--danger); }

.dash-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.dash-stat.gold .dash-stat-value { color: var(--secondary); }
.dash-stat.green .dash-stat-value { color: var(--accent); }

.dash-stat-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Book Cards */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.book-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.book-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--bg), var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-image .no-image {
    font-size: 3rem;
    opacity: 0.4;
}

.book-card-body {
    padding: 16px;
}

.book-card-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text);
}

.book-card-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.book-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.book-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-available { background: #ECFDF5; color: #065F46; }
.status-blocked { background: #FFFBEB; color: #92400E; }
.status-borrowed { background: #FEF2F2; color: #991B1B; }

.book-distance {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Stars */
.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--border);
    transition: color 0.15s;
}

.star.filled { color: var(--secondary); }
.star:hover { color: var(--secondary-light); }

.star-display {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Messages */
.msg-list {
    border-radius: var(--radius);
    overflow: hidden;
}

.msg-thread {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.msg-thread:hover { background: var(--bg); }

.msg-thread.unread {
    background: #EFF6FF;
    font-weight: 700;
}

.msg-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.msg-preview {
    flex: 1;
    min-width: 0;
}

.msg-preview-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.msg-preview-text {
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Chat */
.chat-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.chat-header {
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: var(--bg);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-bubble.flagged {
    opacity: 0.5;
    background: var(--danger-light);
}

.chat-bubble-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 4px;
}

.chat-input {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.chat-input button {
    border-radius: 50px;
    padding: 12px 24px;
}

/* Profile Avatar */
.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin: 0 auto 16px;
}

/* Image Upload */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: #EEF2FF;
}

.upload-area.has-file {
    border-color: var(--accent);
    background: #ECFDF5;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.upload-text {
    color: var(--text-light);
    font-weight: 600;
}

.upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.upload-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover td {
    background: var(--bg);
}

/* Search */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-body);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-bar button {
    border-radius: 50px;
    padding: 14px 28px;
}

.search-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: white;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover, .filter-chip.active {
    border-color: var(--primary);
    background: #EEF2FF;
    color: var(--primary);
}

/* UID Display */
.uid-display {
    background: linear-gradient(135deg, #1E293B, #334155);
    color: #FCD34D;
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: var(--radius);
    text-align: center;
    letter-spacing: 4px;
    margin: 12px 0;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 10px 20px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: var(--font-body);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab:hover { color: var(--primary); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Content Warning Banner */
.content-warning {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #92400E;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Image Thumbnails */
.thumb-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.thumb:hover { transform: scale(1.05); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
}

/* Responsive */
/* Responsive - Tablets */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    
    .nav-container {
        height: 60px;
        padding: 0 16px;
    }
    
    .nav-logo-img {
        height: 48px;
        width: 48px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        z-index: 99;
    }
    
    .nav-links.open { display: flex; }
    
    .nav-links a {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .main-content {
        padding: 16px 14px;
    }
    
    .hero {
        padding: 50px 16px;
        border-radius: var(--radius);
        margin-bottom: 20px;
    }
    
    .hero-logo {
        height: 100px;
        width: 100px;
    }
    
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        padding: 12px 28px;
        font-size: 1rem;
        width: 100%;
        max-width: 260px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .card {
        padding: 20px;
        border-radius: var(--radius);
    }
    
    .card-header {
        font-size: 1.2rem;
    }
    
    .form-row { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .book-grid { grid-template-columns: 1fr; }
    
    .search-bar { flex-direction: column; }
    .search-bar button { width: 100%; }
    .search-filters { gap: 8px; }
    
    .tabs {
        gap: 0;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        mask-image: linear-gradient(to right, black calc(100% - 30px), transparent);
        -webkit-mask-image: linear-gradient(to right, black calc(100% - 30px), transparent);
    }
    
    .tabs.scrolled-end {
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        padding: 10px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .tab:last-child {
        padding-right: 30px;
    }
    
    .chat-bubble { max-width: 90%; }
    
    .auth-container { margin: 20px auto; }
    .auth-container .card { padding: 24px 18px; }
    .auth-title { font-size: 1.5rem; }
    
    .uid-display {
        font-size: 1.1rem;
        letter-spacing: 3px;
        padding: 12px 16px;
    }
    
    .about-hero h1 { font-size: 1.6rem; }
    .about-hero img { height: 90px; width: 90px; }
    .about-section .card { padding: 22px 18px; }
    .about-cta { padding: 30px 16px; }
    .about-cta h2 { font-size: 1.3rem; }
    
    .table-responsive table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px 10px;
    }
    
    .main-footer {
        font-size: 0.8rem;
        padding: 16px 14px;
    }
    
    .main-footer img {
        height: 20px !important;
        width: 20px !important;
    }
}

/* Responsive - Small phones (iPhone SE, etc.) */
@media (max-width: 390px) {
    .nav-logo-img {
        height: 42px;
        width: 42px;
    }
    
    .hero {
        padding: 36px 14px;
    }
    
    .hero-logo {
        height: 70px;
        width: 70px;
    }
    
    .hero h1 { font-size: 1.5rem; }
    
    .dash-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .dash-stat {
        padding: 16px 10px;
    }
    
    .dash-stat-value {
        font-size: 1.5rem;
    }
    
    .bsc-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .code-input {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Camera capture button */
.camera-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.camera-btn:hover {
    background: #059669;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination a {
    background: white;
    border: 2px solid var(--border);
    color: var(--text);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* About Page */
.about-hero {
    text-align: center;
    padding: 50px 20px 30px;
}

.about-hero img {
    height: 120px;
    width: 120px;
    object-fit: contain;
    margin-bottom: 12px;
}

.about-hero h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.about-hero p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.about-section {
    max-width: 800px;
    margin: 0 auto 24px;
}

.about-section .card {
    padding: 32px;
}

.about-section h2 {
    font-family: var(--font-display);
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section p {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.bsc-table {
    width: 100%;
    margin: 12px 0;
}

.bsc-table td {
    padding: 10px 14px;
}

.bsc-table tr:nth-child(even) td {
    background: var(--bg);
}

.bsc-table .bsc-amount {
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.bsc-table .bsc-positive { color: var(--accent); }
.bsc-table .bsc-negative { color: var(--danger); }

.about-cta {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: var(--radius-lg);
    color: white;
    margin: 30px auto;
    max-width: 800px;
}

.about-cta h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.about-cta p {
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 16px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
