@charset "UTF-8";

/* ==========================================
   PC Home Page
   ========================================== */
/* Home layout: single column up to 1200px content, 3:1 split above */
.pc-home-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    padding-bottom: 60px;
}

.pc-home-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.pc-home-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.pc-home-sidebar > * {
    flex: 1;
    min-width: 260px;
}

/* Wide viewport: content area > 1200px → 3:1 split */
@media (min-width: 1340px) {
    .pc-home-feed {
        flex-direction: row;
        gap: 28px;
        max-width: none;
    }
    .pc-home-main {
        flex: 3;
    }
    .pc-home-sidebar {
        flex: 1;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 20px;
        min-width: 260px;
        max-width: 340px;
    }
    .pc-home-sidebar > * {
        flex: none;
        min-width: 0;
    }
}

/* Hero Banner (Continue Learning / Welcome) */
.pc-home-feed .hero-banner {
    width: 100%;
    min-height: 220px;
    border-radius: var(--pc-radius-xl);
    padding: 32px 36px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    position: relative;
    overflow: hidden;
    background-color: var(--pc-primary);
    background-size: cover;
    background-position: center;
}

.pc-home-feed .hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,61,255,0.85) 0%, rgba(13,61,255,0.55) 100%);
    z-index: 1;
}

.pc-home-feed .hero-banner > * {
    position: relative;
    z-index: 2;
}

/* Welcome variant: purple gradient when no thumbnail */
.pc-home-feed .hero-banner.hero-welcome {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 60%, #FF0DDF 100%);
}

.pc-home-feed .hero-banner.hero-welcome::before {
    background: none;
}

.pc-home-feed .hero-banner .banner-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--pc-radius-pill);
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    align-self: flex-start;
}

.pc-home-feed .hero-banner .banner-title {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
}

.pc-home-feed .hero-banner .banner-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.pc-home-feed .hero-banner .banner-progress {
    width: 100%;
    height: 6px;
    border-radius: var(--pc-radius-pill);
    background-color: rgba(255, 255, 255, 0.2);
}

.pc-home-feed .hero-banner .banner-progress-fill {
    height: 100%;
    border-radius: var(--pc-radius-pill);
    background-color: #FFFFFF;
    transition: width 0.3s ease;
}

.pc-home-feed .hero-banner .banner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pc-home-feed .hero-banner .banner-cta {
    height: 44px;
    border-radius: var(--pc-radius-md);
    background-color: #FFFFFF;
    border: none;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.pc-home-feed .hero-banner .banner-cta:hover {
    opacity: 0.9;
}

.pc-home-feed .hero-banner .banner-cta svg {
    width: 18px;
    height: 18px;
    fill: var(--pc-primary);
    stroke: none;
}

.pc-home-feed .hero-banner .banner-cta span {
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-primary);
}

/* Section Header */
.pc-home-feed .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pc-home-feed .section-header .section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pc-text);
}

.pc-home-feed .section-header .section-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-primary);
    cursor: pointer;
    text-decoration: none;
}

.pc-home-feed .section-header .section-more:hover {
    text-decoration: underline;
}

/* Lecture Cards Grid */
.pc-home-feed .lecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pc-home-feed .lecture-card {
    border-radius: var(--pc-radius-lg);
    background-color: var(--pc-surface);
    border: 1px solid var(--pc-border);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.pc-home-feed .lecture-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pc-home-feed .lecture-card .card-thumb {
    width: 100%;
    height: 174px;
    background-color: var(--pc-surface-muted);
    overflow: hidden;
}

.pc-home-feed .lecture-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-home-feed .lecture-card .card-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pc-home-feed .lecture-card .card-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--pc-radius-pill);
    font-size: 11px;
    font-weight: 600;
    align-self: flex-start;
}

.pc-home-feed .lecture-card .card-badge.primary {
    background-color: var(--pc-primary-light);
    color: var(--pc-primary);
}

.pc-home-feed .lecture-card .card-badge.amber {
    background-color: #FEF3C7;
    color: #92400E;
}

.pc-home-feed .lecture-card .card-badge.green {
    background-color: #DCFCE7;
    color: #166534;
}

.pc-home-feed .lecture-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pc-text);
    line-height: 1.4;
}

.pc-home-feed .lecture-card .card-meta {
    font-size: 12px;
    color: var(--pc-text-muted);
}

/* Shortform Grid */
.pc-home-feed .shortform-scroll-wrap {
    position: relative;
}

.pc-home-feed .shortform-grid {
    display: flex;
    gap: 14px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.pc-home-feed .sf-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background 0.2s;
}
.pc-home-feed .sf-nav-btn:hover {
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}
.pc-home-feed .sf-nav-btn.visible {
    display: flex;
}
.pc-home-feed .sf-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: #333;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pc-home-feed .sf-nav-prev {
    left: -16px;
}
.pc-home-feed .sf-nav-next {
    right: -16px;
}

.pc-home-feed .shortform-card {
    width: 180px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.pc-home-feed .shortform-card:hover {
    transform: translateY(-2px);
}

.pc-home-feed .shortform-card .sf-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f3f4f6;
}

.pc-home-feed .shortform-card .sf-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-home-feed .shortform-card .sf-duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.pc-home-feed .shortform-card .sf-card-info {
    padding: 8px 4px 0;
}

.pc-home-feed .shortform-card .sf-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-text, #1f2937);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Stats Cards - Sidebar */
.pc-home-feed .stats-sidebar-card {
    background-color: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pc-home-feed .stats-sidebar-card .stats-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pc-text);
    margin-bottom: 16px;
}

.pc-home-feed .stats-sidebar-card .stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pc-border);
}

.pc-home-feed .stats-sidebar-card .stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pc-home-feed .stats-sidebar-card .stat-row .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--pc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pc-home-feed .stats-sidebar-card .stat-row .stat-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    fill: none;
}

.pc-home-feed .stats-sidebar-card .stat-icon.blue { background-color: var(--pc-primary-light); }
.pc-home-feed .stats-sidebar-card .stat-icon.blue svg { stroke: var(--pc-primary); }
.pc-home-feed .stats-sidebar-card .stat-icon.green { background-color: #DCFCE7; }
.pc-home-feed .stats-sidebar-card .stat-icon.green svg { stroke: #16A34A; }
.pc-home-feed .stats-sidebar-card .stat-icon.amber { background-color: #FEF3C7; }
.pc-home-feed .stats-sidebar-card .stat-icon.amber svg { stroke: #D97706; }
.pc-home-feed .stats-sidebar-card .stat-icon.purple { background-color: #F3E8FF; }
.pc-home-feed .stats-sidebar-card .stat-icon.purple svg { stroke: #9333EA; }

.pc-home-feed .stats-sidebar-card .stat-row .stat-info {
    flex: 1;
}

.pc-home-feed .stats-sidebar-card .stat-row .stat-label {
    font-size: 13px;
    color: var(--pc-text-muted);
}

.pc-home-feed .stats-sidebar-card .stat-row .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--pc-text);
    line-height: 1;
}

/* AI Cafe Sidebar Widget */
.pc-home-feed .ai-cafe-widget {
    border-radius: var(--pc-radius-lg);
    background-color: #e5e7eb;
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.pc-home-feed .ai-cafe-widget .cafe-character {
    position: absolute;
    bottom: 12px;
    left: 10px;
    height: auto;
    max-height: 140px;
    width: auto;
    max-width: 120px;
    z-index: 2;
    pointer-events: none;
}

.pc-home-feed .ai-cafe-widget .cafe-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 130px;
    padding: 20px 16px 12px 0;
}

.pc-home-feed .ai-cafe-widget .cafe-label {
    font-size: 13px;
    color: #6b7280;
}

.pc-home-feed .ai-cafe-widget .cafe-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.pc-home-feed .ai-cafe-widget .cafe-btn {
    display: block;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    width: calc(100% - 32px);
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 16px 16px 16px;
    z-index: 3;
}

.pc-home-feed .ai-cafe-widget .cafe-btn.platform-k {
    background: var(--pc-primary);
    border-color: var(--pc-primary);
    color: #fff;
}

.pc-home-feed .ai-cafe-widget .cafe-btn.platform-k:hover {
    background: #E00BC6;
    box-shadow: 0 4px 12px rgba(13, 61, 255, 0.3);
}

/* Daily Mission Sidebar */
.pc-home-feed .mission-sidebar-card {
    background-color: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pc-text);
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--pc-primary);
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--pc-border);
    border-radius: 6px;
    transition: background-color 0.15s;
}
.pc-home-feed .mission-sidebar-card .mission-sidebar-item:hover {
    background-color: #F8FAFC;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-emoji {
    font-size: 20px;
    flex-shrink: 0;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-info {
    flex: 1;
    min-width: 0;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-text);
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-desc {
    font-size: 11px;
    color: var(--pc-text-muted);
    margin-top: 2px;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-check.done {
    background-color: var(--pc-success);
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-check.done svg {
    width: 13px;
    height: 13px;
    stroke: #FFFFFF;
    fill: none;
    stroke-width: 2.5;
}

.pc-home-feed .mission-sidebar-card .mission-sidebar-check.pending {
    border: 2px solid var(--pc-border);
}

/* (Daily Mission moved to sidebar widget) */

/* (AI Chat Promo moved to sidebar widget) */

/* Community Highlights */
.pc-home-feed .community-grid {
    display: flex;
    gap: 16px;
}

.pc-home-feed .community-card {
    flex: 1;
    background-color: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.pc-home-feed .community-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pc-home-feed .community-card .comm-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-home-feed .community-card .comm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pc-home-feed .community-card .comm-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-text);
}

.pc-home-feed .community-card .comm-user-time {
    font-size: 11px;
    color: var(--pc-text-muted);
}

.pc-home-feed .community-card .comm-body {
    font-size: 14px;
    color: var(--pc-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pc-home-feed .community-card .comm-footer {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--pc-text-muted);
}

.pc-home-feed .community-card .comm-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pc-home-feed .community-card .comm-footer svg {
    width: 14px;
    height: 14px;
    stroke: var(--pc-text-muted);
    fill: none;
    stroke-width: 2;
}

/* Dynamic Feed Container */
#pc-feed-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Popular Content Row - 3 columns x 2 rows */
/* Popular section now reuses .lecture-grid + .lecture-card styles */
