/* ========================================
   SOCIAL MEDIA PAGE — Styles
   ======================================== */

/* --- Page Hero --- */
#social-hero {
    padding: 140px 0 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

#social-hero h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #fde68a 40%, #f59e0b 70%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: heroTitleIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#social-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 32px;
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* --- Filter Tabs --- */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
}

.filter-tab.active {
    color: var(--text-primary);
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.filter-tab svg {
    flex-shrink: 0;
}

/* --- Video Grid --- */
#social-grid {
    padding: 40px 0 100px;
    position: relative;
    z-index: 1;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* --- Video Card --- */
.video-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    transition: var(--transition-smooth);
    aspect-ratio: 9 / 12;
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    z-index: 0;
    filter: blur(40px);
    transition: var(--transition-smooth);
    border-radius: var(--radius-lg);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-glow);
}

.video-card:hover::before {
    opacity: 0.1;
}

.video-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.video-card:hover .video-card-thumb {
    transform: scale(1.06);
    filter: brightness(0.8);
}

/* Overlay gradient on card */
.video-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        transparent 70%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    transition: var(--transition-smooth);
}

.video-card:hover .video-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.1) 70%
    );
}

.video-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.video-card-platform {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
}

.video-card-platform.tiktok {
    background: rgba(255, 0, 80, 0.2);
    color: #ff3b6e;
    border: 1px solid rgba(255, 0, 80, 0.3);
}

.video-card-platform.youtube {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.3);
}


/* No-image placeholder */
.video-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(249,115,22,0.1));
    position: relative;
    z-index: 1;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.06);
}

.modal-overlay.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

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

/* --- Detail Modal --- */
.modal-detail {
    max-width: 560px;
}

.detail-body {
    padding: 24px 28px 28px;
}

.detail-thumbnail {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.detail-badge {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: capitalize;
}

.detail-badge.tiktok {
    background: rgba(255, 0, 80, 0.15);
    color: #ff3b6e;
    border: 1px solid rgba(255, 0, 80, 0.25);
}

.detail-badge.youtube {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.25);
}

.detail-link-value {
    color: var(--accent-yellow);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.detail-link-value:hover {
    color: var(--accent-amber);
    text-decoration: underline;
}

/* Code sections (HTML / CSS / JS blocks) */
.detail-code-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.detail-code-section:first-of-type {
    margin-top: 20px;
    padding-top: 20px;
}

.code-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.code-lang-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
}

.code-lang-badge.html {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.code-lang-badge.css {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.code-lang-badge.js {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.detail-code-block {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.detail-code-block pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    max-height: 250px;
}

.detail-code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 5px 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-yellow);
    border-color: var(--glass-border-hover);
}

.copy-btn.copied {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
}

.copy-label {
    pointer-events: none;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    animation: heroFadeIn 0.8s ease both;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: logoFloat 4s ease-in-out infinite;
}

.empty-state h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Card enter animation --- */
@keyframes cardEnter {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.video-card {
    animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.video-card:nth-child(1) { animation-delay: 0s; }
.video-card:nth-child(2) { animation-delay: 0.08s; }
.video-card:nth-child(3) { animation-delay: 0.16s; }
.video-card:nth-child(4) { animation-delay: 0.24s; }
.video-card:nth-child(5) { animation-delay: 0.32s; }
.video-card:nth-child(6) { animation-delay: 0.40s; }
.video-card:nth-child(7) { animation-delay: 0.48s; }
.video-card:nth-child(8) { animation-delay: 0.56s; }

/* --- Modal scrollbar --- */
.modal-card::-webkit-scrollbar {
    width: 6px;
}

.modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #social-hero {
        padding: 110px 0 30px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .video-card {
        aspect-ratio: 9 / 13;
    }

    .video-card-overlay {
        padding: 14px;
    }

    .video-card-title {
        font-size: 0.85rem;
    }

    .video-card-platform {
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .video-card-play {
        width: 44px;
        height: 44px;
    }

    .video-card-play svg {
        width: 18px;
        height: 18px;
    }

    .modal-card {
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px 20px 14px;
    }

    .detail-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.82rem;
    }
}
