/*
Theme Name: FreeGiftZone App
Theme URI: https://freegiftzone.in
Author: FreeGiftZone
Author URI: https://freegiftzone.in
Description: Custom WordPress theme for FreeGiftZone rewards app with Supabase integration
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fgz-app
*/

/* ==========================================================================
   CSS Variables & Theme Tokens
   ========================================================================== */

:root {
    /* Light Mode Colors */
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;

    /* Font */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: hsl(var(--muted) / 0.4);
}

.sidebar {
    display: none;
    width: 16rem;
    flex-direction: column;
    border-right: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    position: fixed;
    inset: 0;
    z-index: 50;
}

@media (min-width: 768px) {
    .sidebar {
        display: flex;
    }
}

.main-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    .main-content {
        padding-left: 16rem;
    }
}

.main-inner {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .main-inner {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background) / 0.95);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    height: 3.5rem;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .header-inner {
        padding: 0 1.5rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.points-badge {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background-color: hsl(var(--secondary) / 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid hsl(var(--border) / 0.5);
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--primary));
}

@media (min-width: 768px) {
    .points-badge {
        display: flex;
    }
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

.sidebar-inner {
    padding: 1rem 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    margin-bottom: 3.5rem;
}

.sidebar-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    color: hsl(var(--muted-foreground));
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.1);
}

.nav-link.active {
    color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.1);
}

.nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.nav-link .icon-dashboard {
    color: #0ea5e9;
}

.nav-link .icon-earn {
    color: #8b5cf6;
}

.nav-link .icon-redeem {
    color: #c2410c;
}

.nav-link .icon-leaderboard {
    color: #10b981;
}

.nav-link .icon-referrals {
    color: #ca8a04;
}

.nav-link .icon-history {
    color: #6b7280;
}

.nav-link .icon-profile {
    color: #3b82f6;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    padding: 0.5rem 1rem;
    height: 2.5rem;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
    background-color: hsl(var(--destructive) / 0.9);
}

.btn-outline {
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-icon {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
}

.btn-sm {
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: calc(var(--radius) - 4px);
}

.btn-lg {
    height: 2.75rem;
    padding: 0 2rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: 1.5rem;
    padding-top: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    padding-top: 0;
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card-icon {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--muted-foreground));
}

/* NEW Badge */
.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border-radius: 9999px;
    margin-left: 0.5rem;
    animation: new-badge-pulse 2s ease-in-out infinite;
}

@keyframes new-badge-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    color: hsl(var(--foreground));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: hsl(var(--foreground));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-error {
    font-size: 0.875rem;
    color: hsl(var(--destructive));
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.avatar {
    position: relative;
    display: flex;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 9999px;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
}

.avatar-md {
    width: 2.5rem;
    height: 2.5rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
}

.avatar img {
    aspect-ratio: 1/1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.avatar-fallback {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, #6366f1, #9333ea);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   Dropdown Menu
   ========================================================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 14rem;
    background-color: hsl(var(--popover));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    z-index: 100;
    overflow: hidden;
}

.dropdown.open .dropdown-content {
    display: block;
}

.dropdown-label {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: hsl(var(--accent));
}

.dropdown-item svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

.dropdown-item.destructive {
    color: hsl(var(--destructive));
}

.dropdown-separator {
    height: 1px;
    background-color: hsl(var(--border));
    margin: 0.25rem 0;
}

/* ==========================================================================
   Mobile Sidebar Overlay
   ========================================================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 0.5);
    z-index: 40;
}

.sidebar-overlay.open {
    display: block;
}

.mobile-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 16rem;
    background-color: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-sidebar.open {
    transform: translateX(0);
}

@media (min-width: 768px) {

    .sidebar-overlay,
    .mobile-sidebar {
        display: none !important;
    }
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
    display: flex;
    flex-direction: column;
}

.tabs-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background-color: hsl(var(--muted));
    padding: 0.25rem;
    width: 100%;
}

.tab-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 4px);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    transition: all 0.15s ease;
}

.tab-trigger:hover {
    color: hsl(var(--foreground));
}

.tab-trigger.active {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.tab-content {
    margin-top: 0.5rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

@media (max-width: 640px) {
    .tabs-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .tab-trigger {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    caption-side: bottom;
    font-size: 0.875rem;
    border-collapse: collapse;
}

.table th {
    height: 3rem;
    padding: 0 1rem;
    text-align: left;
    vertical-align: middle;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    border-bottom: 1px solid hsl(var(--border));
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid hsl(var(--border));
}

.table tbody tr:hover {
    background-color: hsl(var(--muted) / 0.5);
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: visible;
    }

    .table {
        border-collapse: separate;
        border-spacing: 0 0.75rem;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        border: 1px solid hsl(var(--border));
        border-radius: calc(var(--radius) - 2px);
        background-color: hsl(var(--card));
        margin-bottom: 0.75rem;
        overflow: hidden;
        box-shadow: 0 8px 20px hsl(var(--foreground) / 0.06);
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid hsl(var(--border));
        flex-wrap: wrap;
    }

    .table tbody tr:last-child {
        margin-bottom: 0;
    }

    .table tbody td:last-child {
        border-bottom: none;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: hsl(var(--muted-foreground));
        flex-shrink: 0;
    }

    .table tbody td[data-label=""] {
        justify-content: center;
    }

    .table tbody td[data-label=""]::before {
        content: "";
    }
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.badge-default {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-success {
    background-color: #22c55e;
    color: white;
}

.badge-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.badge-outline {
    border: 1px solid hsl(var(--border));
    background-color: transparent;
    color: hsl(var(--foreground));
}

/* ==========================================================================
   Modal / Dialog
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 0.8);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}

.modal-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem;
    text-align: center;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.modal-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.modal-content {
    padding: 0 1.5rem 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: calc(var(--radius) - 4px);
    opacity: 0.7;
    transition: opacity 0.15s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid hsl(var(--muted));
    border-top-color: hsl(var(--primary));
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg,
            hsl(var(--muted)) 25%,
            hsl(var(--muted) / 0.5) 50%,
            hsl(var(--muted)) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: calc(var(--radius) - 2px);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Auth Pages
   ========================================================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: hsl(var(--background));
}

.auth-card {
    width: 100%;
    max-width: 24rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: block;
    margin: 0 auto 1rem;
    height: 2.5rem;
    width: auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-subtitle {
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: hsl(var(--border));
}

.auth-divider span {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: white;
    color: #1f1f1f;
    border: 1px solid hsl(var(--border));
}

.btn-google:hover {
    background-color: #f5f5f5;
}

.dark .btn-google {
    background-color: #202124;
    color: white;
    border-color: #5f6368;
}

.dark .btn-google:hover {
    background-color: #303134;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: hsl(var(--muted-foreground));
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.rounded {
    border-radius: var(--radius);
}

.rounded-full {
    border-radius: 9999px;
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ==========================================================================
   Blog Reading Progress Bar
   ========================================================================== */

.blog-reading-progress-wrap {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: hsl(var(--border));
    z-index: 60;
}

.blog-reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    transition: width 0.15s ease-out;
    border-radius: 0 2px 2px 0;
}

/* ==========================================================================
   Blog Styles (WordPress Posts)
   ========================================================================== */

.blog-container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-meta {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.blog-content {
    line-height: 1.75;
}

.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content p {
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content a {
    color: hsl(222.2 47.4% 30%);
    text-decoration: underline;
}

.dark .blog-content a {
    color: hsl(210 40% 80%);
}

.blog-content code {
    background-color: hsl(var(--muted));
    padding: 0.125rem 0.375rem;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.875em;
}

.blog-content pre {
    background-color: hsl(var(--muted));
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.blog-content blockquote {
    border-left: 4px solid hsl(var(--border));
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

/* Blog Archive / List */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    padding: 1.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-card-title a:hover {
    color: hsl(var(--primary));
}

.blog-card-excerpt {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.blog-card-meta {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}