/* =========================================================
   CardNFC — Global Design System
   web_design.css
   ========================================================= */

/* ---------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   --------------------------------------------------------- */
:root {
    /* Background layers */
    --bg:            #050505;
    --surface:       #111111;
    --surface-hover: #1a1a1a;

    /* Borders */
    --border:        #222222;

    /* Typography */
    --text-main:     #ffffff;
    --text-muted:    #888888;

    /* Accent / glow */
    --accent:        #ffffff;
    --glow:          rgba(255, 255, 255, 0.1);

    /* Gradient helper */
    --gradient-text: linear-gradient(180deg, #fff, #888);

    /* Font & easing */
    --font-main:     'Inter', sans-serif;
    --font-arabic:   'Cairo', sans-serif;
    --easing:        cubic-bezier(0.16, 1, 0.3, 1);
}

/* RTL / Arabic Font Override */
html[lang="ar"],
html[dir="rtl"] {
    --font-main: var(--font-arabic);
    direction: rtl;
    text-align: right;
}

html[lang="ar"] body,
html[dir="rtl"] body {
    text-align: right;
}

/* ---------------------------------------------------------
   Light Theme Tokens
   --------------------------------------------------------- */
[data-theme="light"] {
    /* Backgrounds — true white + Apple-style off-white surfaces */
    --bg:            #ffffff;
    --surface:       #f2f2f7;
    --surface-hover: #e8e8ee;

    /* Borders */
    --border:        #d1d1da;

    /* Typography */
    --text-main:     #0a0a0a;
    --text-muted:    #6b7280;

    /* Accent / glow */
    --accent:        #0a0a0a;
    --glow:          rgba(0, 0, 0, 0.04);

    /* Dark gradient for light theme headings */
    --gradient-text: linear-gradient(180deg, #0a0a0a, #555555);
}

/* Ambient glow in light mode — barely visible warm tone */
[data-theme="light"] .ambient-glow {
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.04) 0%, transparent 55%);
}

/* Scrollbar in light mode */
[data-theme="light"] ::-webkit-scrollbar-track { background: #f2f2f7; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c0c0cc; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #9999aa; }

/* Button glow in light mode */
[data-theme="light"] .btn-primary {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.14);
}
[data-theme="light"] .btn-secondary:hover {
    border-color: #b0b0bc;
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------
   3. Custom Scrollbar
   --------------------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg);
}

/* ---------------------------------------------------------
   4. Ambient Glow Background
   --------------------------------------------------------- */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
}

/* ---------------------------------------------------------
   5. Layout Utilities
   --------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

main {
    flex-grow: 1;
    z-index: 10;
}

/* ---------------------------------------------------------
   6. Premium Buttons
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.4s var(--easing);
    cursor: pointer;
    letter-spacing: -0.2px;
    border: none;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg);
    border: 1px solid var(--text-main);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-main);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: #444;
}

/* ---------------------------------------------------------
   7. Scroll-reveal Animations
   --------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeInUp 1s var(--easing) forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ---------------------------------------------------------
   8. Typography Helpers
   --------------------------------------------------------- */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------------------------------------------------------
   9. Pagination Custom Styling
   --------------------------------------------------------- */
.pagination-container {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center; /* Center pagination */
    align-items: center;
    width: 100%;
}

.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 8px;
    margin-bottom: 0;
    flex-wrap: wrap; /* Ensure it wraps on small screens */
    justify-content: center;
    gap: 4px;
}

.page-item .page-link {
    color: var(--text-main);
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s var(--easing);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
}

.page-item.active .page-link {
    z-index: 3;
    color: var(--bg);
    background-color: var(--text-main);
    border-color: var(--text-main);
    font-weight: 600;
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    pointer-events: none;
    background-color: var(--bg);
    border-color: var(--border);
}

.page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: var(--surface-hover);
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .pagination-container {
        padding: 16px;
    }
    .page-item .page-link {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 32px;
    }
}

