/* ============================================================
   LifeStyleMod – Tutorial View Page (V2 – Banner Inspired)
   ============================================================ */

/* ---------- Container ---------- */
.tv-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    position: relative;
    z-index: 1;
}

/* ---------- Breadcrumb ---------- */
.tv-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
}
.tv-breadcrumb a {
    color: var(--primary-hover);
    text-decoration: none;
}
.tv-breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- Hero Media ---------- */
.tv-hero-media {
    position: relative;
    width: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(245,158,11,0.2);
    margin-bottom: 35px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(139,92,246,0.15);
    animation: tv-fadeUp 0.6s ease forwards;
}
.tv-hero-media img,
.tv-hero-media video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}
.tv-hero-media .tv-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    font-size: 80px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    opacity: 0.7;
}
.tv-video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.tv-video-overlay:hover {
    background: rgba(0,0,0,0.7);
}
.tv-play-icon {
    font-size: 70px;
    color: #fff;
    text-shadow: 0 0 20px rgba(139,92,246,0.7);
    pointer-events: none;
    transition: transform 0.2s;
}
.tv-video-overlay:hover .tv-play-icon {
    transform: scale(1.1);
}

/* ---------- Main Content ---------- */
.tv-main-content {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 32px;
    padding: 35px;
    margin-bottom: 35px;
    animation: tv-fadeUp 0.7s ease forwards;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.tv-article-title {
    font-size: clamp(26px, 6vw, 38px);
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Meta row */
.tv-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 25px;
}
.tv-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.tv-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.tv-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tv-author-info:hover .tv-author-avatar {
    transform: scale(1.05);
}
.tv-author-name {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}
.tv-author-role-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 3px;
    font-weight: 600;
}
.tv-badge-owner {
    background: rgba(139,92,246,0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139,92,246,0.25);
}
.tv-badge-admin {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.25);
}
.tv-badge-creator {
    background: rgba(45,212,191,0.15);
    color: #5eead4;
    border: 1px solid rgba(45,212,191,0.25);
}
.tv-badge-user {
    background: rgba(100,116,139,0.15);
    color: #94a3b8;
    border: 1px solid rgba(100,116,139,0.25);
}
.tv-meta-date {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article body */
.tv-article-body {
    font-size: 16px;
    line-height: 2.1;
    color: #e2e8f0;
    margin-bottom: 35px;
    word-wrap: break-word;
}
.tv-article-body h2,
.tv-article-body h3 {
    margin: 24px 0 12px;
    color: #fbbf24;
    font-weight: 700;
}
.tv-article-body a {
    color: #a78bfa;
}
.tv-article-body pre {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
}
.tv-article-body img {
    max-width: 100%;
    border-radius: 12px;
}

/* ---------- Attachments ---------- */
.tv-attachments-section {
    margin-bottom: 30px;
}
.tv-attachments-title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fbbf24;
}
.tv-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.tv-attachment-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    backdrop-filter: blur(10px);
}
.tv-attachment-card:hover {
    background: rgba(139,92,246,0.08);
    border-color: #8b5cf6;
    transform: translateY(-2px);
}
.tv-file-icon {
    width: 48px;
    height: 48px;
    background: rgba(139,92,246,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.tv-file-details {
    flex: 1;
}
.tv-file-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    word-break: break-word;
}
.tv-file-size {
    font-size: 12px;
    color: var(--text-muted);
}
.tv-download-btn-mini {
    background: #8b5cf6;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.tv-attachment-card:hover .tv-download-btn-mini {
    background: #a78bfa;
}

/* ---------- Action buttons ---------- */
.tv-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}
.tv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
.tv-btn-copy {
    border-color: rgba(45,212,191,0.3);
    color: #5eead4;
}
.tv-btn-copy:hover {
    background: rgba(45,212,191,0.15);
}
.tv-btn-share {
    border-color: rgba(245,158,11,0.3);
    color: #fbbf24;
}
.tv-btn-share:hover {
    background: rgba(245,158,11,0.15);
}
.tv-btn-edit {
    border-color: rgba(139,92,246,0.3);
    color: #c4b5fd;
}
.tv-btn-edit:hover {
    background: rgba(139,92,246,0.15);
}
.tv-btn-delete {
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}
.tv-btn-delete:hover {
    background: rgba(239,68,68,0.15);
}

.tv-copied-tooltip {
    font-size: 12px;
    margin-right: 10px;
    color: #5eead4;
    opacity: 0;
    transition: opacity 0.2s;
}
.tv-copied-tooltip.show {
    opacity: 1;
}

.tv-share-toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    background: #2dd4bf;
    color: #000;
    padding: 14px 28px;
    border-radius: 50px;
    z-index: 1000;
    opacity: 0;
    transition: 0.4s;
    pointer-events: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(45,212,191,0.4);
}
.tv-share-toast.show {
    opacity: 1;
}

/* Footer */
.tv-footer {
    text-align: center;
    padding: 35px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(2,6,23,0.5);
    backdrop-filter: blur(10px);
    margin-top: 40px;
}

/* ---------- Animations ---------- */
@keyframes tv-fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .tv-container {
        padding: 10px 12px 30px;
    }
    .tv-main-content {
        padding: 24px;
    }
    .tv-hero-media {
        margin-bottom: 25px;
    }
    .tv-attachment-grid {
        grid-template-columns: 1fr;
    }
}