/* =============================================
   FTM GUYS — LIVE CAMS — Redesign
   ============================================= */

/* Orbitron Font */
@font-face {
    font-family: 'Orbitron';
    src: url('fonts/Orbitron-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Orbitron';
    src: url('fonts/Orbitron-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* ---- Variables ---- */
:root {
    --primary:      #5bcefa;
    --secondary:    #f5a9b8;
    --bg:           #0c0e1a;
    --bg-card:      #141826;
    --bg-elevated:  #1a1f33;
    --border:       #272d47;
    --text:         #dde1f0;
    --muted:        #6d748f;
    --live:         #ff4757;
    --glow-blue:    rgba(91, 206, 250, 0.22);
    --glow-pink:    rgba(245, 169, 184, 0.22);
    --radius:       8px;
    --radius-lg:    12px;
}

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

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: rgba(20, 24, 38, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 18px var(--glow-blue);
    line-height: 1;
}

.header-tagline {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 71, 87, 0.10);
    border: 1px solid rgba(255, 71, 87, 0.35);
    color: var(--live);
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--live);
    border-radius: 50%;
    flex-shrink: 0;
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 2rem;
}

/* ---- Online Count Bar ---- */
.online-count {
    text-align: center;
    padding: 0.55rem 1rem;
    background: rgba(91, 206, 250, 0.04);
    border: 1px solid rgba(91, 206, 250, 0.14);
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: var(--primary);
}

.count-number {
    font-weight: 700;
}

/* =============================================
   MODELS GRID
   Dynamic columns driven by --grid-cols (set by JS)
   ============================================= */
.models-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 2), 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* Card entrance animation */
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInCard 0.35s ease forwards;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.model-card:nth-child(1)   { animation-delay: 0.04s; }
.model-card:nth-child(2)   { animation-delay: 0.08s; }
.model-card:nth-child(3)   { animation-delay: 0.12s; }
.model-card:nth-child(4)   { animation-delay: 0.16s; }
.model-card:nth-child(5)   { animation-delay: 0.20s; }
.model-card:nth-child(6)   { animation-delay: 0.24s; }
.model-card:nth-child(n+7) { animation-delay: 0.28s; }

.model-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 28px var(--glow-blue);
    transform: translateY(-4px);
}

/* ---- Thumbnail ---- */
.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    overflow: hidden;
}

.thumb-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(14px) saturate(1.2);
    transform: scale(1.1);
    opacity: 0;
    transition: opacity 0.2s;
}

.thumb-bg-visible { opacity: 1; }

.thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.model-card:hover .thumb-img {
    transform: scale(1.04);
}

/* Overlay badges */
.live-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(8, 8, 20, 0.72);
    border: 1px solid rgba(255, 71, 87, 0.45);
    backdrop-filter: blur(4px);
    color: var(--live);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 100px;
}

.live-pill-dot {
    width: 5px;
    height: 5px;
    background: var(--live);
    border-radius: 50%;
    animation: blink 1.4s ease-in-out infinite;
}

.hd-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(91, 206, 250, 0.85);
    color: #0c0e1a;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ---- Model Info ---- */
.model-info {
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.model-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.model-viewers {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.eye-icon { margin-right: 3px; }

/* ---- Card CTA ---- */
.cta-btn {
    margin: 0 10px 10px;
    padding: 7px 12px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.cta-btn:hover,
.model-card:hover .cta-btn {
    background: var(--primary);
    color: var(--bg);
    box-shadow: 0 0 14px var(--glow-blue);
}

.cta-dot {
    font-size: 7px;
    color: var(--live);
}

/* ---- Loading ---- */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 1rem;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--muted); font-size: 0.9rem; }

/* =============================================
   DESCRIPTION / ABOUT SECTION
   ============================================= */
.description-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 2.5rem;
}

.description-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.03em;
}

.description-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 1.25rem 0 0.45rem;
    letter-spacing: 0.03em;
}

.description-section p {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 960px;
}

.description-section p + p { margin-top: 0.6rem; }

.description-section strong {
    color: var(--text);
    font-weight: 600;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    background: rgba(91, 206, 250, 0.05);
    border: 1px solid rgba(91, 206, 250, 0.18);
    border-radius: 100px;
    font-size: 0.73rem;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* =============================================
   MODAL
   ============================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 6, 14, 0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 1rem;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    box-shadow: 0 0 60px var(--glow-blue);
    overflow: hidden;
    /* auto margins inside a flex-start container = vertical centering
       when content is shorter than viewport, scrollable when taller */
    flex-shrink: 0;
    margin: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(91, 206, 250, 0.04);
    gap: 1rem;
}

.modal-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

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

.modal-body {
    padding: 1.25rem 1.25rem 1.75rem;
}

/* Chaturbate iframe outer — provides correct layout height after JS scaling */
.iframe-outer {
    width: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 6px;
    margin-bottom: 1.1rem;
    /* height set dynamically by resizeIframe() */
}

/* Iframe scaler — always at native 850×523; JS applies transform: scale() */
.iframe-container {
    width: 850px;
    height: 523px;
    background: #000;
    flex-shrink: 0;
}

.iframe-container iframe {
    display: block;
    width: 850px;
    height: 523px;
    border: none;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Primary CTA */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.9rem 2.75rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #0c0e1a;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 8px 32px var(--glow-blue);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s;
    border-radius: inherit;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 42px var(--glow-pink), 0 0 40px var(--glow-blue);
}

.cta-button:hover::after {
    background: rgba(255, 255, 255, 0.08);
}

.cta-icon {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.cta-platform-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Adblock Warning */
.adblock-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.07);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 6px;
    color: #ffc107;
    font-size: 0.83rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.warning-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.warning-text { flex: 1; }
.warning-close {
    background: none;
    border: none;
    color: #ffc107;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}
.warning-close:hover { opacity: 1; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: rgba(20, 24, 38, 0.35);
}

.footer p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0.2rem 0;
}

/* =============================================
   RESPONSIVE — TABLET  ≤ 768px
   ============================================= */
@media (max-width: 768px) {

    .header-container { padding: 0.65rem 1rem; }
    .header-title     { font-size: 1.2rem; }
    .header-tagline   { display: none; }

    .container { padding: 0.9rem 0.75rem 1.75rem; }

    .description-section { padding: 1.25rem 1rem; }

    .models-grid { gap: 0.75rem; }

    /* Thin backdrop strip visible on all sides so tapping outside closes modal */
    .modal { padding: 0.35rem; }
    .modal-content {
        max-width: 100%;
        border-radius: var(--radius);
    }

    .modal-header { padding: 0.7rem 1rem; }

    /* No horizontal padding — iframe fills available modal width */
    .modal-body { padding: 0 0 1.25rem; }

    /* iframe-outer radius removed; JS scale handles sizing */
    .iframe-outer {
        border-radius: 0;
        margin-bottom: 0.6rem;
    }

    .modal-actions { padding: 0 0.85rem; }

    .cta-button {
        width: 100%;
        padding: 0.85rem 1.5rem;
        font-size: 0.88rem;
    }
}

/* Portrait mobile — iframe fills full viewport width, no side gaps */
@media (max-width: 768px) and (orientation: portrait) {
    .modal          { padding-left: 0; padding-right: 0; }
    .modal-content  { border-radius: 0; }
}

/* =============================================
   RESPONSIVE — MOBILE  ≤ 480px
   ============================================= */
@media (max-width: 480px) {

    .header-title { font-size: 1.05rem; }

    .container { padding: 0.65rem 0.5rem 1.5rem; }

    .models-grid { gap: 0.5rem; }

    .hd-badge  { padding: 1px 5px; font-size: 8px; }
    .live-pill { font-size: 8px; padding: 2px 6px; }

    .cta-btn { font-size: 0.7rem; padding: 6px 10px; }

    .cta-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.82rem;
        letter-spacing: 0.07em;
    }

    .description-section h2 { font-size: 0.95rem; }
    .description-section p  { font-size: 0.82rem; }
}
