@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-deep: #0a0f1c;
    --bg-surface: #111a2d;
    --bg-card: rgba(16, 28, 50, 0.75);
    --bg-card-hover: rgba(22, 38, 65, 0.85);
    --bg-glass: rgba(14, 25, 48, 0.6);
    --border-glass: rgba(56, 100, 150, 0.18);
    --border-glass-hover: rgba(56, 100, 150, 0.35);
    --accent-primary: #0ea5e9;
    --accent-secondary: #38bdf8;
    --accent-gradient: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);
    --sidebar-width: 230px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.08);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --window-margin: 40px;
    --window-radius: 18px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', 'Montserrat', -apple-system, sans-serif;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    padding: var(--window-margin);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: rgba(94, 181, 247, 0.25);
    border-radius: 3px;
}

/* === JANELA === */
.app-layout {
    display: flex;
    height: calc(100vh - var(--window-margin) * 2);
    max-width: 1400px;
    margin: 0 auto;
    border-radius: var(--window-radius);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    position: relative;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-glass);
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    z-index: 100;
    overflow-y: auto;
    border-radius: 0;
    transition: transform var(--transition-smooth);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px 8px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 18px;
    text-decoration: none;
}

.sidebar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 22px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.sidebar-nav-item:hover {
    background: rgba(94, 181, 247, 0.08);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: #0d7377;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.sidebar-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.sidebar-nav-item.active svg {
    opacity: 1;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
    margin-top: 6px;
}

.sidebar-channel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.sidebar-channel:hover {
    background: rgba(94, 181, 247, 0.06);
    color: var(--text-primary);
}

.sidebar-channel.active-channel {
    background: rgba(94, 181, 247, 0.1);
    color: var(--accent-secondary);
}

.sidebar-channel img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-channel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-social {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: center;
    gap: 16px;
}

.sidebar-social a {
    color: var(--text-muted);
    font-size: 18px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sidebar-social a:hover {
    color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-area {
    flex: 1;
    padding: 28px 30px 50px 30px;
}

/* === PAGES === */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === HERO BANNER === */
.hero-banner {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #0e1f35 0%, #0c1828 50%, #112540 100%);
    padding: 40px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-glass);
    margin-bottom: 40px;
    transition: border-color var(--transition-smooth);
}

.hero-banner:hover {
    border-color: var(--border-glass-hover);
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 116, 119, 0.1) 0%, rgba(14, 165, 233, 0.08) 50%, rgba(15, 25, 50, 0.2) 100%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 18px;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.hero-badge svg {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 14px;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.hero-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.65;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    width: fit-content;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.25);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.35);
}

.hero-cta svg {
    width: 18px;
    height: 18px;
}

/* === SECTIONS === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* === PRODUCTS GRID === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 44px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.5s ease forwards;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.product-card:hover::before {
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:nth-child(1) {
    animation-delay: .05s
}

.product-card:nth-child(2) {
    animation-delay: .1s
}

.product-card:nth-child(3) {
    animation-delay: .15s
}

.product-card:nth-child(4) {
    animation-delay: .2s
}

.product-card:nth-child(5) {
    animation-delay: .25s
}

.product-card:nth-child(6) {
    animation-delay: .3s
}

.product-card:nth-child(7) {
    animation-delay: .35s
}

.product-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid var(--border-glass);
    transition: border-color var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.product-card:hover .product-card-avatar {
    border-color: var(--accent-primary);
}

.product-card-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.product-card-badge.vip {
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.product-card-badge.free {
    background: rgba(94, 181, 247, 0.12);
    color: var(--accent-secondary);
    border: 1px solid rgba(94, 181, 247, 0.25);
}

.product-card-badge.tool {
    background: rgba(255, 200, 50, 0.12);
    color: #ffc832;
    border: 1px solid rgba(255, 200, 50, 0.25);
}

.product-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background: rgba(94, 181, 247, 0.06);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

/* === TRENDING / INFO === */
.trending-section {
    margin-bottom: 40px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.trending-card {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.8), rgba(10, 20, 40, 0.6));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.trending-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
    transform-origin: left;
}

.trending-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-3px);
}

.trending-card:hover::before {
    transform: scaleX(1);
}

.trending-card-icon {
    margin-bottom: 10px;
    color: var(--accent-secondary);
}

.trending-card-icon svg {
    width: 22px;
    height: 22px;
}

.trending-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}

.trending-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* === CANAL PAGE === */
.canal-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-glass);
}

.canal-page-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-glass);
}

.canal-page-info {
    flex: 1;
}

.canal-page-name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.canal-page-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.canal-page-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.canal-page-actions .btn {
    flex: none;
    padding: 12px 28px;
    font-size: 0.85rem;
}

.canal-page-section {
    margin-bottom: 32px;
}

.canal-page-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent-secondary);
}

.canal-page-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.canal-page-section ul {
    list-style: none;
    padding: 0;
}

.canal-page-section ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.canal-page-section ul li svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.canal-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.canal-price-tag small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    margin-bottom: 24px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-secondary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* === FOOTER === */
.app-footer {
    padding: 18px 30px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* === MOBILE === */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    position: fixed;
    z-index: 101;
    transition: background var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: rgba(94, 181, 247, 0.08);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

@media screen and (max-width: 768px) {
    body {
        padding: 6px;
    }

    :root {
        --window-radius: 14px;
    }

    .app-layout {
        height: calc(100vh - 20px);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        border-radius: 0;
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .content-area {
        padding: 60px 16px 40px 16px;
    }

    .hero-banner {
        padding: 28px 24px;
        min-height: 220px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .canal-page-header {
        flex-direction: column;
        text-align: center;
    }

    .canal-page-actions {
        justify-content: center;
    }
}