/* ================================
   CreatorTools Hub — Custom Styles
   ================================ */

/* --- Glassmorphism Cards --- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 25px 50px -12px rgba(99, 102, 241, 0.15),
        0 0 0 1px rgba(99, 102, 241, 0.1);
}

.dark .glass-card:hover {
    box-shadow:
        0 25px 50px -12px rgba(99, 102, 241, 0.25),
        0 0 0 1px rgba(129, 140, 248, 0.2);
}

/* --- Hero Gradient Background --- */
.hero-gradient {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 25%, #f5f3ff 50%, #ede9fe 75%, #eef2ff 100%);
    position: relative;
    overflow: hidden;
}

.dark .hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #0f172a 50%, #1e1b4b 75%, #0f172a 100%);
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: heroShift 15s ease-in-out infinite;
}

@keyframes heroShift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(2%, -2%); }
    66% { transform: translate(-2%, 2%); }
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Toast Notifications --- */
.toast {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 420px;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.2);
    animation: toastSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-size: 0.875rem;
    font-weight: 500;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.toast-info {
    background: rgba(99, 102, 241, 0.95);
    color: white;
}

.toast-exit {
    animation: toastSlideOut 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* --- Loading Spinner --- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Loading Overlay --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.4s ease;
}

.dark .loading-overlay {
    background: rgba(15, 23, 42, 0.9);
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Input Focus Ring --- */
.input-focus {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-focus:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
                0 0 0 1px rgba(99, 102, 241, 0.4);
    border-color: #6366f1;
}

/* --- Button Shimmer Effect --- */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 100%
    );
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s;
}

.btn-shimmer:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* --- Thumbnail Card --- */
.thumbnail-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbnail-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* --- Transcript Block --- */
.transcript-block {
    max-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.transcript-block::-webkit-scrollbar {
    width: 6px;
}

.transcript-block::-webkit-scrollbar-track {
    background: transparent;
}

.transcript-block::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.transcript-block::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* --- Custom Scrollbar (Global) --- */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* --- Blob Background Decoration --- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.dark .blob {
    opacity: 0.15;
}

/* --- Feature Icon Container --- */
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.glass-card:hover .feature-icon {
    transform: scale(1.1) rotate(-3deg);
}

/* --- Pulsing Dot (Live indicator) --- */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* --- Blog Card Image --- */
.blog-card-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover .blog-card-image {
    transform: scale(1.08);
}

/* --- Ad Placeholder Responsive --- */
@media (max-width: 767px) {
    #ad-header {
        display: none !important;
    }
}

/* --- Smooth page transitions --- */
main {
    animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
