/* =============================================================
   Fansly Design Language — paste-ready theme
   Extracted from the real fansly.com / Fanhub frontend stylesheet.
   Drop this in, set <html> to dark (default) or add class="bright-theme"
   for the light theme, then use the documented class names.
   Everything is em-based off a 16px root. Primary action color is #2699f7.
   ============================================================= */

/* ---------- Foundation tokens: DARK THEME (default) ---------- */
:root {
    /* Layout */
    --maxContentWidth: 70em;          /* ~1120px main content cap */
    --button-radius: 0.5em;
    --border-radius-1: 0.1em;
    --border-radius-2: 0.5em;         /* the standard radius, used everywhere */
    --border-radius-3: 0.25em;

    /* Text */
    --font-1: #d6dce8;                /* primary text */
    --font-tint-2: #bbc1cb;
    --font-tint-3: #9da2ad;
    --dark-blue-1: #637395;           /* secondary / muted text + icons */
    --post-content: #e2e8f0;
    --pure-white: #fff;
    --grey-1: rgb(182, 182, 182);

    /* Backgrounds (layered, lighter as the number grows) */
    --dark-1: #111215;                /* page background */
    --dark-2: #191e26;                /* primary surface / card */
    --dark-3: #1a1e26;                /* raised surface / hover fill */
    --dark-5: #16161a;                /* card / nav surface */
    --dark-7: #26324a;                /* button hover */
    --dark-8: #0e0f12;                /* deepest */
    --nav-color: #16161a;
    --modal-bg: #16161a;
    --dropdown-bg-color: #16161a;
    --dropdown-bg-color-hover: #2a3142;
    --selected-tab: #1a1e26;

    /* Inputs */
    --input-bg: #0e0f12;
    --input-bg-2: #191a1e;
    --input-bg-2-border: #2f3136;
    --input-addon: #343d53;
    --dark-blue-1-outline: #343d53;

    /* Action / brand — identical across themes */
    --blue-1: #2699f7;                /* PRIMARY action color */
    --blue-1-hover: #2699f7;
    --blue-1-alpha: #2699f79c;
    --blue-1-alpha-2: #2699f728;
    --blue-1-outline: #2699f7;

    /* Semantic */
    --red-1: #c35b5b;
    --red-1-hover: #c55656;
    --red-2: #e91916;
    --green-1: #40bb55;
    --green-2: #77ce78;
    --green-3: #2fbc86;
    --orange-1: #ffad42b7;
    --gold-1: #EAB308;

    /* Effects */
    --border-color: rgba(255, 255, 255, 0.06);
    --hover-alpha: rgba(255, 255, 255, 0.02);
    --extreme-alpha: rgba(255, 255, 255, 0.1);
    --dark-transparency: rgba(0, 0, 0, 0.8);
    --scroll-bar: rgba(255, 255, 255, 0.1);

    /* Switch / toggle */
    --switch: rgba(255, 255, 255, 0.2);
    --switch-toggle: #fff;
    --switch-toggle-selected: #77ce78;
    --switch-toggle-active: #77ce7941;

    /* Shadows — deliberately soft */
    --box-shadow-1: rgb(0 0 0 / 6%) 0px 3px 3px -2px, rgb(0 0 0 / 4%) 0px 3px 4px 0px, rgb(0 0 0 / 2%) 0px 2px 8px 0px;
    --box-shadow-4: rgba(255, 255, 255, 0.02) 0px 1px 1px 0px;

    /* Subscription tier accents */
    --tier-blue-bg: #3b82f6;
    --tier-green-bg: #10b981;
    --tier-yellow-bg: #f59e0b;
    --tier-orange-bg: #f97316;
    --tier-red-bg: #ef4444;
    --tier-magenta-bg: #d946ef;
    --tier-legendary-bg: linear-gradient(135deg, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #8b5cf6, #d946ef);
}

/* ---------- Foundation tokens: BRIGHT (light) THEME ---------- */
/* Add class="bright-theme" to <html>. Pure white base, Twitter-style
   soft shadows, thin borders for separation (see bright-theme principles). */
html.bright-theme {
    --font-1: rgb(20, 30, 40);
    --font-tint-2: rgb(125, 125, 125);
    --font-tint-3: rgb(85, 90, 100);
    --dark-blue-1: rgba(86, 102, 120, 1);
    --post-content: rgb(19, 19, 19);
    --pure-white: #fff;

    --dark-1: #ffffff;                /* page background = pure white */
    --dark-2: #f5f5f5;
    --dark-3: #f0f2f4;
    --dark-5: #f5f5f5;
    --dark-7: #f0f2f4;
    --dark-8: #f0f2f4;
    --nav-color: #fff;
    --modal-bg: #ffffff;
    --dropdown-bg-color: #ffffff;
    --dropdown-bg-color-hover: #f5f5f5;
    --selected-tab: #fff;

    --input-bg: #ffffff;
    --input-bg-2: #ffffff;
    --input-bg-2-border: #B0B0B0;
    --input-addon: rgba(0, 0, 0, 0.05);
    --dark-blue-1-outline: rgba(0, 0, 0, 0.05);

    --blue-1: #2699f7;
    --red-1: #df4343;
    --red-1-hover: #c53838;
    --green-1: #27d644;

    --border-color: rgba(0, 0, 0, 0.05);
    --hover-alpha: rgba(0, 0, 0, 0.02);
    --extreme-alpha: rgba(0, 0, 0, 0.1);
    --dark-transparency: rgba(0, 0, 0, 0.2);
    --scroll-bar: rgba(0, 0, 0, 0.15);

    /* Twitter-style: wide spread, very low opacity. Never heavy in light mode. */
    --box-shadow-1: rgba(101, 119, 134, 0.2) 0px 0px 15px, rgba(101, 119, 134, 0.15) 0px 0px 3px 1px;
    --box-shadow-4: rgba(101, 119, 134, 0.2) 0px 0px 15px, rgba(101, 119, 134, 0.15) 0px 0px 3px 1px;

    --tier-blue-bg: #2563eb;
    --tier-green-bg: #059669;
    --tier-yellow-bg: #d97706;
    --tier-orange-bg: #ea580c;
    --tier-red-bg: #dc2626;
    --tier-magenta-bg: #c026d3;
}

/* ---------- Base ---------- */
/* Roboto is the platform font (weights 100/300/400/500/700/900).
   Load it: https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-size: 16px;                  /* root em anchor */
    background-color: var(--dark-1);
    color: var(--font-1);
    -webkit-font-smoothing: antialiased;
}

/* The single highest-impact polish rule: transitions on every interactive thing. */
a, button, .btn, input, select, textarea,
.tab-nav-item, .nav-dropdown-item, .fansly-toggle-card, .list-item, .media-grid-item {
    transition: color 150ms ease, background-color 150ms ease,
                border-color 150ms ease, box-shadow 150ms ease;
}

a { color: var(--blue-1); text-decoration: none; }

:focus-visible { outline: 2px solid var(--blue-1); outline-offset: 2px; }

.bold { font-weight: 700; }
.semi-bold { font-weight: 500; }
.muted { color: var(--dark-blue-1); }

/* ---------- Page scaffolding ---------- */
.page-content { max-width: var(--maxContentWidth); margin: 0 auto; padding: 1em 1em 1.5em 1em; }
.page-title { font-size: 1.75em; font-weight: 700; }

/* ---------- Buttons (btn v2) ---------- */
.btn {
    display: inline-block;
    padding: 0.2em 0.8em;
    cursor: pointer;
    border-radius: var(--button-radius);
    font-size: 0.875em;
    text-align: center;
    user-select: none;
    background-color: var(--dark-3);
    color: var(--font-1);
    border: none;
}
.btn:hover { background-color: var(--dark-7); }
.btn.small  { padding: 0.1em 0.5em; font-size: 0.75em; }
.btn.medium { padding: 0.35em 1.5em; }
.btn.large  { padding: 0.6em 1.8em; }

.btn.solid-blue  { background-color: var(--blue-1);  color: var(--pure-white); }
.btn.solid-green { background-color: var(--green-1); color: var(--pure-white); }
.btn.solid-red   { background-color: var(--red-1);   color: var(--pure-white); }
.btn.solid-grey  { background-color: var(--dark-3);  color: var(--font-1); }
.btn.solid-blue:hover  { background-color: var(--blue-1-hover); filter: brightness(1.08); }

.btn.outline-blue { background: transparent; border: 2px solid var(--blue-1); color: var(--blue-1); }
.btn.outline-red  { background: transparent; border: 2px solid var(--red-1);  color: var(--red-1); }
.btn.outline-dark-blue { background: transparent; border: 2px solid var(--dark-blue-1-outline); color: var(--font-1); }
.btn.outline-blue:hover { background-color: var(--blue-1-alpha-2); }

.btn.transparent { background: transparent; color: var(--font-1); }
.btn.disabled, .btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* ---------- Inputs ---------- */
input, select, textarea {
    font-family: inherit;
    font-size: 0.875em;
    line-height: 1.2;
    color: var(--font-1);
    background-color: var(--input-bg-2);
    border: 1px solid var(--input-bg-2-border);
    border-radius: var(--button-radius);
    padding: 0.7em 0.9em;
    width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue-1); outline: none; }
input::placeholder, textarea::placeholder { color: var(--dark-blue-1); }

.input-group { display: flex; flex-direction: row; align-items: center; }
.input-group .input-addon {
    padding: 0.7em 1em;
    background-color: var(--dark-blue-1-outline);
    color: var(--dark-blue-1);
    border-radius: var(--button-radius) 0 0 var(--button-radius);
    white-space: nowrap;
}
.input-group input { border-radius: 0 var(--button-radius) var(--button-radius) 0; }

/* ---------- Tabs ---------- */
.tab-nav-items { display: flex; border-bottom: 1px solid var(--border-color); }
.tab-nav-item {
    padding: 0.5em 0;
    min-width: 8em;
    text-align: center;
    font-size: 0.875em;
    cursor: pointer;
    color: var(--dark-blue-1);
    border-bottom: 2px solid transparent;
}
.tab-nav-item:hover { color: var(--blue-1); background-color: var(--blue-1-alpha-2); }
.tab-nav-item.selected { color: var(--blue-1); border-color: var(--blue-1); font-weight: 700; }

/* ---------- Cards ---------- */
.content-card {
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    padding: 1em 1.2em;
    background: var(--dark-2);
}
.list-item {
    display: flex; flex-direction: row; align-items: center; gap: 0.75em;
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--border-color);
}
.list-item:hover { background: var(--hover-alpha); }

/* ---------- Toggle card ---------- */
.fansly-toggle-card {
    display: flex; flex-direction: row; align-items: center; gap: 1em;
    padding: 0.85em 1.2em;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    cursor: pointer;
}
.fansly-toggle-card:hover { background-color: var(--dark-3); }
.fansly-toggle-card-label { font-size: 0.875em; font-weight: 600; color: var(--dark-blue-1); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.65em; font-weight: bold; line-height: 1;
    height: 1.6em; min-width: 1.6em; padding: 0 0.4em;
    border-radius: 0.8em;
    background: var(--blue-1); color: var(--pure-white);
}
.badge.grey { background: var(--dark-3); color: var(--font-1); }

/* ---------- Skeleton loader ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--dark-3) 25%, var(--dark-2) 50%, var(--dark-3) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--border-radius-3);
}
.skeleton-text  { height: 0.875em; margin-bottom: 0.5em; }
.skeleton-circle { border-radius: 50%; }
.skeleton-media { width: 100%; aspect-ratio: 16/9; border-radius: var(--button-radius); }
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Responsive table -> cards on mobile ---------- */
.table { border: 1px solid var(--border-color); border-radius: var(--button-radius); overflow: hidden; font-size: 0.875em; }
.table-row { display: flex; flex-direction: row; padding: 0.75em 1em; border-bottom: 1px solid var(--border-color); }
.table-header-row { font-weight: 600; color: var(--dark-blue-1); }
.table-cell { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 0.5em; }

@media only screen and (max-width: 800px) {
    .table-header-row { display: none; }
    .table-row { flex-direction: column; gap: 0.3em; }
    .table-row .table-cell { display: flex; justify-content: space-between; white-space: normal; }
    .table-row .table-cell::before {
        content: attr(data-label);
        font-weight: 600; font-size: 0.8em; text-transform: uppercase;
        color: var(--dark-blue-1); margin-right: 1em;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
