/* ================================================================
   TikTok Tools — Premium Glass Redesign
   tiktok-style.css  |  Unfreeze Astra Child Theme
   ================================================================ */

/* ── 0. Box-sizing reset ── */
.ut-tiktok *,
.ut-article * {
    box-sizing: border-box;
}

/* ── 1. Full-page background via body class (set by JS) ── */
body.tts-page {
    background: linear-gradient(145deg, #f0f4ff 0%, #fafcff 30%, #ffffff 55%, #fdf5ff 80%, #f8f0ff 100%) !important;
    min-height: 100vh;
}

/* Transparent Astra wrappers so blobs/gradient show through */
body.tts-page #content,
body.tts-page .site-content,
body.tts-page .ast-container,
body.tts-page .ast-article-single,
body.tts-page .entry-content,
body.tts-page .hentry,
body.tts-page .ast-page-builder-template,
body.tts-page .page-content,
body.tts-page #primary,
body.tts-page .content-area {
    background: transparent !important;
}

/* ── 2. Ambient floating orbs (injected by tiktok-style.js) ── */
.tts-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.tts-orb-1 {
    width: min(700px, 70vw);
    height: min(700px, 70vw);
    top: -15%;
    left: -15%;
    background: radial-gradient(circle, rgba(168,85,247,0.18) 0%, rgba(99,102,241,0.08) 40%, transparent 70%);
    filter: blur(65px);
    animation: tts-float-a 22s ease-in-out infinite;
}

.tts-orb-2 {
    width: min(600px, 60vw);
    height: min(600px, 60vw);
    bottom: -12%;
    right: -12%;
    background: radial-gradient(circle, rgba(244,63,94,0.14) 0%, rgba(251,113,133,0.06) 40%, transparent 70%);
    filter: blur(65px);
    animation: tts-float-b 28s ease-in-out infinite;
}

.tts-orb-3 {
    width: min(500px, 50vw);
    height: min(500px, 50vw);
    top: 45%;
    left: 38%;
    background: radial-gradient(circle, rgba(14,165,233,0.11) 0%, transparent 70%);
    filter: blur(70px);
    animation: tts-float-c 20s ease-in-out infinite;
}

@keyframes tts-float-a {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(35px,25px) scale(1.04); }
    66%      { transform: translate(-18px,38px) scale(0.97); }
}
@keyframes tts-float-b {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(-30px,-22px) scale(1.03); }
    66%      { transform: translate(22px,-36px) scale(0.98); }
}
@keyframes tts-float-c {
    0%,100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(0,0) scale(1.18); }
}

/* ── 3. Mouse spotlight glow ── */
.tts-mouse-glow {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* background set dynamically by JS */
}
.tts-mouse-glow.tts-glow-on {
    opacity: 1;
}

/* ── 4. Tool card container ── */
.ut-tiktok-container {
    position: relative;
    z-index: 2;
    max-width: 720px !important;
    margin: 0 auto 2.5rem !important;
    padding: 2.75rem 2.5rem !important;
    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border-radius: 2rem !important;
    border: 1px solid rgba(255,255,255,0.85) !important;
    box-shadow:
        0 0 0 1px rgba(99,102,241,0.06),
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 22px rgba(0,0,0,0.07),
        0 28px 56px rgba(0,0,0,0.10),
        0 48px 88px rgba(99,102,241,0.06),
        inset 0 1px 0 rgba(255,255,255,0.98),
        inset 0 -1px 0 rgba(0,0,0,0.02) !important;
    transition:
        transform 0.38s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.35s ease !important;
    will-change: transform;
    overflow: visible;
}

/* Inner glass shimmer overlay */
.ut-tiktok-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.55) 0%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0.12) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Push content above the shimmer */
.ut-tiktok-container > * {
    position: relative;
    z-index: 1;
}

/* ── 5. Page heading H1 ── */
.ut-tiktok-container h1 {
    position: relative !important;
    margin: 0 0 2rem 0 !important;
    font-size: clamp(1.35rem, 3.5vw, 2.1rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
    text-align: center !important;
    color: #0d1117 !important;
    text-shadow: none !important;
}

/* Gradient accent line under h1 */
.ut-tiktok-container h1::after {
    content: '';
    display: block;
    width: 3.5rem;
    height: 3px;
    margin: 0.7rem auto 0;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 100px;
}

/* ── 6. Input group wrapper ── */
.ut-tiktok-input-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.4rem !important;
}

.ut-tiktok-input-group > div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ── 7. Labels ── */
.ut-tiktok-input-group label {
    display: block !important;
    font-size: 0.77rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    margin-bottom: 0.25rem !important;
}

/* ── 8. Inputs & Selects ── */
.ut-tiktok-input-group input,
.ut-tiktok-input-group select,
.ut-tiktok-input-group textarea {
    width: 100% !important;
    padding: 0.875rem 1.1rem !important;
    background: rgba(255,255,255,0.96) !important;
    border: 1.5px solid rgba(15,23,42,0.11) !important;
    border-radius: 0.875rem !important;
    font-size: 1rem !important;
    color: #1e293b !important;
    outline: none !important;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        inset 0 1px 2px rgba(0,0,0,0.03) !important;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease !important;
    font-family: inherit !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Custom select arrow */
.ut-tiktok-input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230f172a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.75rem !important;
    cursor: pointer !important;
}

/* Focus ring */
.ut-tiktok-input-group input:focus,
.ut-tiktok-input-group select:focus,
.ut-tiktok-input-group textarea:focus {
    border-color: rgba(99,102,241,0.55) !important;
    box-shadow:
        0 0 0 4px rgba(99,102,241,0.10),
        0 1px 3px rgba(0,0,0,0.04) !important;
    background: #ffffff !important;
}

.ut-tiktok-input-group input::placeholder {
    color: rgba(100,116,139,0.60) !important;
    font-weight: 400 !important;
}

.ut-tiktok-input-group input[readonly],
.ut-tiktok-input-group input[disabled] {
    background: rgba(248,250,252,0.92) !important;
    color: #334155 !important;
    cursor: default !important;
    border-color: rgba(15,23,42,0.07) !important;
}

/* ── 9. Helper small text ── */
.ut-tiktok-input-group small {
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
    line-height: 1.5 !important;
    margin-top: 0.2rem !important;
    display: block !important;
    font-weight: 400 !important;
}

/* ── 10. Buttons – Black Glossy (excludes .faq-question) ── */
.ut-tiktok button:not(.faq-question) {
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.9rem 2rem !important;
    background: linear-gradient(180deg,#333333 0%,#1a1a1a 50%,#0d0d0d 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.9rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition:
        transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.25s ease !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 2px 4px rgba(0,0,0,0.22),
        0 6px 18px rgba(0,0,0,0.30),
        0 1px 0 #000 !important;
    width: auto !important;
    min-width: unset !important;
}

/* Top glossy shine */
.ut-tiktok button:not(.faq-question)::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 44% !important;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.02) 100%
    ) !important;
    border-radius: 0.9rem 0.9rem 0 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Click ripple overlay */
.ut-tiktok button:not(.faq-question)::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background: radial-gradient(
        circle at var(--rx,50%) var(--ry,50%),
        rgba(255,255,255,0.24) 0%,
        transparent 58%
    ) !important;
    opacity: 0 !important;
    transition: opacity 0.55s ease !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.ut-tiktok button:not(.faq-question).tts-rippling::after {
    opacity: 1 !important;
    transition: none !important;
}

.ut-tiktok button:not(.faq-question):hover {
    transform: translateY(-2px) scale(1.012) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 4px 8px rgba(0,0,0,0.22),
        0 14px 32px rgba(0,0,0,0.36),
        0 1px 0 #000 !important;
}

.ut-tiktok button:not(.faq-question):active {
    transform: translateY(0) scale(0.993) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 1px 4px rgba(0,0,0,0.25) !important;
}

.ut-tiktok button:not(.faq-question):disabled {
    opacity: 0.52 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ── 11. Inline-styled anchor "download" buttons ── */
.ut-tiktok a[href][style*="background"] {
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(180deg,#333333 0%,#1a1a1a 50%,#0d0d0d 100%) !important;
    color: #ffffff !important;
    border-radius: 0.875rem !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    padding: 0.875rem 1.75rem !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 4px 14px rgba(0,0,0,0.30) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.ut-tiktok a[href][style*="background"]:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 8px 24px rgba(0,0,0,0.38) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ── 12. Success / Error messages ── */
#successMessage {
    background: rgba(220,252,231,0.92) !important;
    color: #14532d !important;
    border: 1px solid rgba(74,222,128,0.42) !important;
    border-radius: 0.9rem !important;
    box-shadow: 0 2px 10px rgba(74,222,128,0.16), inset 0 1px 0 rgba(255,255,255,0.82) !important;
    padding: 1rem 1.25rem !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    font-weight: 600 !important;
}

#errorMessage {
    background: rgba(254,226,226,0.92) !important;
    color: #7f1d1d !important;
    border: 1px solid rgba(252,165,165,0.48) !important;
    border-radius: 0.9rem !important;
    box-shadow: 0 2px 10px rgba(239,68,68,0.14), inset 0 1px 0 rgba(255,255,255,0.82) !important;
    padding: 1rem 1.25rem !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    font-weight: 600 !important;
}

/* ── 13. Loading spinner ── */
.spinner {
    border-color: rgba(15,23,42,0.10) !important;
    border-top-color: #1e293b !important;
}

/* ── 14. Results containers (z-index & positioning) ── */
#resultsContainer,
#result,
[id$="Container"],
[id$="Section"],
[id$="Results"] {
    position: relative;
    z-index: 2;
}

/* Glass treatment for inner result panels */
.ut-tiktok #videoSection,
.ut-tiktok #videoInfo,
.ut-tiktok #imagesContainer,
.ut-tiktok #profileInfo,
.ut-tiktok #resultsContainer > div,
.ut-tiktok .result-card,
.ut-tiktok .stat-card {
    border-radius: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ut-tiktok .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12) !important;
}

/* ── 15. Article section ── */
.ut-article {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* Override inline green h2 */
.ut-article h2,
.ut-article h2[style] {
    color: #0d1117 !important;
    -webkit-text-fill-color: #0d1117 !important;
    position: relative;
    padding-bottom: 0.55rem;
    margin-bottom: 1rem;
}

/* Accent underline */
.ut-article h2::after,
.ut-article h2[style]::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 2.4rem;
    height: 2.5px;
    background: linear-gradient(90deg,#6366f1,#8b5cf6,#ec4899);
    border-radius: 100px;
}

/* Override inline green h3 */
.ut-article h3,
.ut-article h3[style] {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}

.ut-article p {
    color: #475569;
    line-height: 1.85;
}

.ut-article ul,
.ut-article ol {
    color: #475569;
    line-height: 1.85;
}

.ut-article strong {
    color: #0f172a;
    font-weight: 700;
}

/* ── 16. FAQ Accordion ── */
.faq-container {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.faq-item {
    background: rgba(255,255,255,0.84) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(255,255,255,0.68) !important;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 14px rgba(0,0,0,0.07),
        inset 0 1px 0 rgba(255,255,255,0.88) !important;
    overflow: hidden !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.faq-item:hover {
    box-shadow:
        0 2px 5px rgba(0,0,0,0.05),
        0 8px 22px rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.88) !important;
    transform: translateY(-1px) !important;
}

/* Override button base styles for faq-question */
.faq-question {
    width: 100% !important;
    text-align: left !important;
    padding: 1rem 1.35rem !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.975rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    box-shadow: none !important;
    letter-spacing: 0 !important;
    transition: background 0.18s ease !important;
    transform: none !important;
    min-width: unset !important;
    overflow: visible !important;
    position: static !important;
}

.faq-question::before {
    content: none !important;
    display: none !important;
    background: none !important;
}

.faq-question::after {
    content: none !important;
    display: none !important;
}

.faq-question:hover {
    background: rgba(15,23,42,0.04) !important;
    transform: none !important;
    box-shadow: none !important;
}

.faq-question:active {
    transform: none !important;
    box-shadow: none !important;
    background: rgba(15,23,42,0.06) !important;
}

.faq-answer {
    padding: 0 1.35rem 1.1rem !important;
    color: #64748b !important;
    line-height: 1.82 !important;
    font-size: 0.94rem !important;
}

.faq-answer p {
    margin: 0 !important;
}

/* ── 17. Emoji grid cards ── */
#emojiGrid > div,
.emoji-card {
    background: rgba(255,255,255,0.84) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,0.68) !important;
    border-radius: 1.25rem !important;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.88) !important;
    transition:
        transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.22s ease !important;
    overflow: hidden !important;
}

#emojiGrid > div:hover,
.emoji-card:hover {
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow:
        0 14px 32px rgba(0,0,0,0.13),
        inset 0 1px 0 rgba(255,255,255,0.88) !important;
}

/* ── 18. Toast notification ── */
#toast {
    background: linear-gradient(135deg,#1e293b 0%,#0f172a 100%) !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: #f8fafc !important;
}

/* ── 19. Profile images ── */
.ut-tiktok img[id*="rofile"] {
    box-shadow:
        0 4px 20px rgba(0,0,0,0.15),
        0 0 0 4px rgba(255,255,255,0.95) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.ut-tiktok img[id*="rofile"]:hover {
    transform: scale(1.04) !important;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.20),
        0 0 0 4px rgba(255,255,255,0.95) !important;
}

/* ── 20. Video elements ── */
.ut-tiktok video {
    border-radius: 1.1rem !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16) !important;
    transition: box-shadow 0.3s ease !important;
}

.ut-tiktok video:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.22) !important;
}

/* ── 21. Live followers card ── */
.live-followers-card {
    border-radius: 1.35rem !important;
    overflow: hidden !important;
}

/* ── 22. Display ad areas ── */
.display-ad {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 20px !important;
}
.display-ad-top {
    margin-top: 0 !important;
    margin-bottom: 20px;
}

/* ── 23. Scroll-reveal system (classes added by JS) ── */
.tts-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.42s cubic-bezier(0.16,1,0.3,1),
        transform 0.42s cubic-bezier(0.16,1,0.3,1);
    will-change: opacity, transform;
}

.tts-reveal.tts-visible {
    opacity: 1;
    transform: translateY(0);
}

.tts-d1 { transition-delay: 0.00s; }
.tts-d2 { transition-delay: 0.05s; }
.tts-d3 { transition-delay: 0.10s; }
.tts-d4 { transition-delay: 0.15s; }
.tts-d5 { transition-delay: 0.20s; }
.tts-d6 { transition-delay: 0.25s; }

/* ── 24. Responsive ── */
@media (max-width: 768px) {
    .ut-tiktok-container {
        padding: 1.8rem 1.35rem !important;
        border-radius: 1.5rem !important;
    }

    .ut-tiktok-container h1 {
        font-size: clamp(1.15rem,5.5vw,1.65rem) !important;
        margin-bottom: 1.5rem !important;
    }

    .ut-tiktok button:not(.faq-question) {
        width: 100% !important;
        padding: 0.875rem 1.5rem !important;
    }

    .faq-question {
        font-size: 0.9rem !important;
        padding: 0.875rem 1.1rem !important;
    }

    .ut-article h2,
    .ut-article h2[style] {
        font-size: 1.4rem !important;
    }

    .tts-orb-3 { display: none; }
}

@media (max-width: 480px) {
    .ut-tiktok-container {
        padding: 1.25rem 0.95rem !important;
        border-radius: 1.25rem !important;
    }

    .ut-tiktok-input-group label {
        font-size: 0.72rem !important;
    }

    .ut-tiktok-input-group input,
    .ut-tiktok-input-group select {
        padding: 0.8rem 0.9rem !important;
        font-size: 0.95rem !important;
    }

    .ut-article { padding: 0 0.5rem; }

    .faq-question { font-size: 0.85rem !important; }
}

/* ── 25. Keyframes ── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.7; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
