
/* =========================================================
   SYNCHUB — PREMIUM DARK UI
   Preto + Roxo + Rosa
========================================================= */

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

:root {
    --bg: #08050d;
    --bg-secondary: #0d0815;

    --sidebar: #100a18;

    --card: #15101f;
    --card-hover: #1b1428;
    --card-secondary: #211631;

    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;

    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --blue: #3b82f6;

    --text: #ffffff;
    --text-secondary: #d1d5db;
    --muted: #9ca3af;

    --border: rgba(255, 255, 255, 0.08);
    --border-purple: rgba(139, 92, 246, 0.35);

    --shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   BODY
========================================================= */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(139, 92, 246, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(236, 72, 153, 0.06),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    font-family: Inter, sans-serif;

    overflow-x: hidden;
}

/* =========================================================
   BACKGROUND GLOW
========================================================= */

.background-glow {
    position: fixed;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    filter: blur(160px);

    opacity: 0.12;

    z-index: -1;

    pointer-events: none;
}

.glow-1 {
    background: #9333ea;

    top: -250px;
    left: -200px;
}

.glow-2 {
    background: #ec4899;

    bottom: -250px;
    right: -200px;
}

/* =========================================================
   LINKS / BUTTONS
========================================================= */

button,
a {
    font-family: inherit;
}

button {
    cursor: pointer;
}

/* =========================================================
   MAIN APPLICATION
========================================================= */

.app {
    display: flex;
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    width: 260px;
    min-width: 260px;

    min-height: 100vh;

    background: rgba(15, 10, 22, 0.96);

    backdrop-filter: blur(25px);

    border-right: 1px solid var(--border);

    padding: 25px;

    display: flex;
    flex-direction: column;

    position: relative;
    z-index: 10;
}

/* =========================================================
   LOGO
========================================================= */

.logo {
    width: 100%;
    height: 120px;

    margin-bottom: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 20px;

    overflow: hidden;

    position: relative;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #faf5ff 50%,
            #f3e8ff 100%
        );

    border: 1px solid rgba(168, 85, 247, 0.35);

    box-shadow:
        0 12px 30px rgba(124, 58, 237, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.logo img {
    max-width: 85%;
    max-height: 95px;

    width: auto;
    height: auto;

    object-fit: contain;

    position: relative;
    z-index: 1;

    filter:
        drop-shadow(
            0 4px 12px rgba(124, 58, 237, 0.25)
        );
}

.logo h2 {
    font-size: 26px;
}

.logo span {
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   MENU
========================================================= */

.menu {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.menu a {
    text-decoration: none;

    color: var(--muted);

    padding: 14px 16px;

    border-radius: 14px;

    font-weight: 600;

    display: flex;
    align-items: center;

    gap: 13px;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.menu a span {
    width: 24px;

    display: inline-flex;
    justify-content: center;

    font-size: 18px;
}

.menu a:hover {
    background: rgba(139, 92, 246, 0.10);

    color: #ffffff;

    transform: translateX(4px);
}

.menu .active {
    background:
        linear-gradient(
            90deg,
            #8b5cf6,
            #7c3aed
        );

    color: #ffffff;

    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.25);
}

/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.sidebar-footer {
    margin-top: auto;

    padding-top: 25px;
}

.version {
    padding: 16px;

    border-radius: 16px;

    background: var(--card);

    border: 1px solid var(--border);

    text-align: center;

    color: white;

    font-weight: 600;
}

.version small {
    display: block;

    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}

/* =========================================================
   LOGOUT
========================================================= */

.logout-btn {
    width: 100%;

    margin-top: 15px;

    padding: 13px;

    border: 1px solid rgba(239, 68, 68, 0.25);

    border-radius: 14px;

    color: #fca5a5;

    background: rgba(239, 68, 68, 0.08);

    font-size: 14px;
    font-weight: 700;

    transition: all 0.25s ease;
}

.logout-btn:hover {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        );

    color: white;

    border-color: transparent;

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(239, 68, 68, 0.25);
}

/* =========================================================
   MAIN
========================================================= */

.main {
    flex: 1;

    min-width: 0;

    min-height: 100vh;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    min-height: 90px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 20px 40px;

    border-bottom: 1px solid var(--border);

    background: rgba(8, 5, 13, 0.45);

    backdrop-filter: blur(15px);
}

.topbar h1 {
    font-size: 32px;

    font-weight: 800;

    letter-spacing: -0.5px;
}

.topbar p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 14px;
}

.user {
    display: flex;

    align-items: center;

    gap: 14px;
}

.notification {
    width: 46px;
    height: 46px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background: var(--card);

    color: white;

    font-size: 18px;

    transition: 0.25s ease;
}

.notification:hover {
    border-color: var(--border-purple);

    background: var(--card-hover);

    transform: translateY(-2px);
}

.avatar {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #ec4899
        );

    display: flex;

    justify-content: center;
    align-items: center;

    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(139, 92, 246, 0.25);
}

/* =========================================================
   CONTENT
========================================================= */

.content {
    padding: 40px;
}

/* =========================================================
   ALERT
========================================================= */

.alert-success {
    margin-bottom: 25px;

    padding: 15px 18px;

    border-radius: 14px;

    background: rgba(34, 197, 94, 0.10);

    border: 1px solid rgba(34, 197, 94, 0.25);

    color: #86efac;

    font-weight: 600;
}

/* =========================================================
   DASHBOARD — STATS
========================================================= */

.stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 40px;
}

.stat-card {
    min-width: 0;

    background:
        linear-gradient(
            145deg,
            var(--card),
            var(--card-secondary)
        );

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 24px;

    display: flex;

    align-items: center;

    gap: 18px;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(139, 92, 246, 0.45);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    width: 58px;
    min-width: 58px;

    height: 58px;

    border-radius: 17px;

    display: flex;

    justify-content: center;
    align-items: center;

    font-size: 25px;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.16);
}

.stat-icon.pink {
    background: rgba(236, 72, 153, 0.16);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.16);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.16);
}

.stat-card h2 {
    font-size: 28px;

    line-height: 1.2;

    margin-bottom: 4px;

    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card p {
    color: var(--muted);

    font-size: 14px;
}

/* =========================================================
   SECTION TITLE
========================================================= */

.section-title {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 26px;

    font-weight: 750;
}

.new-video {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;

    color: white;

    background:
        linear-gradient(
            90deg,
            #8b5cf6,
            #ec4899
        );

    padding: 12px 20px;

    border-radius: 12px;

    font-weight: 700;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.new-video:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.25);
}

/* =========================================================
   VIDEO GRID
========================================================= */

.video-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(300px, 1fr)
        );

    gap: 25px;
}

/* =========================================================
   VIDEO CARD
========================================================= */

.video-card {
    background:
        linear-gradient(
            145deg,
            var(--card),
            var(--card-secondary)
        );

    border: 1px solid var(--border);

    border-radius: 20px;

    overflow: hidden;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(139, 92, 246, 0.45);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.30);
}

.video-card video {
    width: 100%;

    display: block;

    aspect-ratio: 9 / 16;

    object-fit: cover;

    background: #000;
}

/* =========================================================
   VIDEO INFO
========================================================= */

.video-info {
    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 8px;
}

.video-info h3 {
    color: white;

    font-size: 16px;

    font-weight: 700;

    line-height: 1.4;

    overflow-wrap: anywhere;
}

.video-info p {
    color: var(--muted);

    font-size: 13px;
}

.video-info > span {
    align-self: flex-start;

    display: inline-flex;

    padding: 7px 12px;

    border-radius: 50px;

    background: rgba(34, 197, 94, 0.10);

    color: #4ade80;

    font-size: 12px;

    font-weight: 600;

    margin-top: 4px;
}

/* =========================================================
   VIDEO ACTIONS
========================================================= */

.video-actions {
    display: flex;

    align-items: stretch;

    gap: 10px;

    margin-top: 10px;
}

.video-actions form {
    margin: 0;
}

.video-actions form:first-child {
    flex: 1;
}

/* =========================================================
   PUBLISH BUTTON
========================================================= */

.publish-button {
    width: 100%;

    border: none;

    padding: 13px 15px;

    border-radius: 12px;

    background:
        linear-gradient(
            90deg,
            #8b5cf6,
            #ec4899
        );

    color: white;

    font-weight: 700;

    font-size: 13px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.publish-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 22px rgba(139, 92, 246, 0.25);
}

/* =========================================================
   DELETE BUTTON
========================================================= */

.delete-button {
    width: 48px;
    height: 100%;

    min-height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 10px;

    background: rgba(239, 68, 68, 0.10);

    color: #f87171;

    border: 1px solid rgba(239, 68, 68, 0.20);

    border-radius: 12px;

    font-size: 17px;

    cursor: pointer;

    transition: all 0.25s ease;
}

.delete-button:hover {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        );

    color: white;

    border-color: transparent;

    transform: translateY(-2px);

    box-shadow:
        0 10px 20px rgba(239, 68, 68, 0.25);
}

/* =========================================================
   OLD DELETE CLASSES — COMPATIBILITY
========================================================= */

.delete-btn {
    border: none;

    color: white;

    cursor: pointer;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        );

    transition: 0.25s ease;
}

.delete-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 20px rgba(239, 68, 68, 0.30);
}

/* =========================================================
   VIDEOS PAGE
========================================================= */

.videos-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 30px;
}

.videos-header h2 {
    font-size: 28px;

    margin-bottom: 8px;
}

.videos-header p {
    color: var(--muted);
}

.upload-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #ec4899
        );

    color: white;

    padding: 12px 22px;

    border-radius: 14px;

    font-weight: 600;

    transition: 0.25s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.25);
}

.videos-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(300px, 1fr)
        );

    gap: 25px;
}

.video-preview video {
    width: 100%;

    height: 180px;

    object-fit: cover;

    border-radius: 14px;
}

.watch-btn {
    background: #26203a;

    color: white;

    padding: 9px 16px;

    border-radius: 10px;

    text-decoration: none;
}

.empty-card {
    background: var(--card);

    border: 1px solid var(--border);

    padding: 40px;

    border-radius: 20px;

    text-align: center;

    color: var(--muted);
}

/* =========================================================
   TIKTOK
========================================================= */

.tiktok-container {
    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 500px;
}

.tiktok-card {
    width: 420px;
    max-width: 100%;

    background:
        linear-gradient(
            145deg,
            var(--card),
            var(--card-secondary)
        );

    border: 1px solid var(--border);

    border-radius: 25px;

    padding: 40px;

    text-align: center;

    box-shadow: var(--shadow);
}

.tiktok-icon {
    font-size: 60px;

    margin-bottom: 20px;
}

.tiktok-card h2 {
    color: white;

    font-size: 28px;

    margin-bottom: 15px;
}

.tiktok-card p {
    color: var(--muted);

    line-height: 1.6;

    margin-bottom: 30px;
}

.tiktok-btn {
    width: 100%;

    display: block;

    text-decoration: none;

    border: none;

    padding: 14px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #00f2ea,
            #ff0050
        );

    color: white;

    font-weight: 700;

    font-size: 16px;

    cursor: pointer;

    transition: 0.25s ease;
}

.tiktok-btn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 25px rgba(255, 0, 80, 0.20);
}

.tiktok-account {
    margin: 20px 0;

    text-align: center;
}

.tiktok-account strong {
    display: block;

    font-size: 22px;

    color: white;
}

.username {
    margin-top: 6px;

    color: #b5b5b5;

    font-size: 15px;
}

.tiktok-status {
    margin: 18px 0;

    color: #aaa;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 10px;
}

.tiktok-status span {
    width: 10px;
    height: 10px;

    background: #777;

    border-radius: 50%;
}

/* =========================================================
   ANALYTICS
========================================================= */

.analytics-page {
    padding: 40px;
}

.analytics-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 35px;
}

.analytics-header h1 {
    font-size: 32px;

    color: white;
}

.analytics-header p {
    color: var(--muted);

    margin-top: 5px;
}

.analytics-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px, 1fr)
        );

    gap: 25px;
}

.analytics-card {
    background:
        rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(15px);

    border: 1px solid var(--border);

    padding: 30px;

    border-radius: 22px;

    display: flex;

    align-items: center;

    gap: 20px;

    transition: 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(139, 92, 246, 0.35);
}

.analytics-card h2 {
    color: white;

    font-size: 35px;

    margin: 0;
}

.analytics-card p {
    color: var(--muted);

    margin-top: 5px;
}

.icon {
    width: 65px;
    min-width: 65px;

    height: 65px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 30px;

    border-radius: 20px;
}

.purple .icon {
    background: rgba(124, 58, 237, 0.18);
}

.pink .icon {
    background: rgba(236, 72, 153, 0.18);
}

.blue .icon {
    background: rgba(59, 130, 246, 0.18);
}

.green .icon {
    background: rgba(34, 197, 94, 0.18);
}

.status {
    background: rgba(34, 197, 94, 0.12);

    color: #4ade80;

    padding: 10px 18px;

    border-radius: 30px;

    display: flex;

    align-items: center;

    gap: 10px;
}

.status span {
    width: 9px;
    height: 9px;

    background: #4ade80;

    border-radius: 50%;
}

.status--disconnected {
    background: rgba(156, 163, 175, 0.12);

    color: #d1d5db;

    text-decoration: none;
}

.status--disconnected span {
    background: #9ca3af;
}

/* =========================================================
   LEGAL PUBLIC PAGES
========================================================= */

.legal-public {
    min-height: 100vh;

    padding: 40px;
}

.legal-public__topbar {
    max-width: 900px;

    margin: 0 auto 24px;

    display: flex;

    justify-content: flex-end;
}

.legal-public__login {
    padding: 10px 18px;

    border: 1px solid rgba(196, 181, 253, 0.45);

    border-radius: 10px;

    background: rgba(139, 92, 246, 0.16);

    color: #e9d5ff;

    cursor: pointer;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    text-decoration: none;

    transition: 0.25s ease;
}

.legal-public__login:hover {
    background: rgba(139, 92, 246, 0.30);

    transform: translateY(-2px);
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1100px) {

    .stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        width: 230px;
        min-width: 230px;

        padding: 20px;
    }

    .content {
        padding: 30px;
    }

    .topbar {
        padding: 20px 30px;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;

        min-height: auto;

        padding: 15px;

        border-right: none;

        border-bottom: 1px solid var(--border);
    }

    .logo {
        height: 90px;

        margin-bottom: 15px;
    }

    .logo img {
        max-height: 75px;
    }

    .menu {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 7px;
    }

    .menu a {
        padding: 11px;

        font-size: 13px;
    }

    .sidebar-footer {
        display: none;
    }

    .topbar {
        min-height: 75px;

        padding: 15px 20px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .topbar p {
        font-size: 12px;
    }

    .notification {
        width: 40px;
        height: 40px;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }

    .content {
        padding: 20px;
    }

    .stats {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .section-title {
        flex-direction: column;

        align-items: flex-start;
    }

    .new-video {
        width: 100%;
    }

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

    .videos-header {
        flex-direction: column;

        align-items: flex-start;
    }

    .upload-btn {
        width: 100%;
    }

    .analytics-page {
        padding: 20px;
    }

    .analytics-header {
        flex-direction: column;

        align-items: flex-start;
    }

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

    .tiktok-container {
        min-height: auto;

        padding: 20px 0;
    }

    .tiktok-card {
        padding: 25px;
    }

    .legal-public {
        padding: 20px;
    }
}

/* =========================================================
   RESPONSIVE — VERY SMALL SCREENS
========================================================= */

@media (max-width: 420px) {

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

    .topbar {
        padding: 15px;
    }

    .topbar h1 {
        font-size: 21px;
    }

    .user {
        gap: 7px;
    }

    .notification {
        display: none;
    }

    .content {
        padding: 15px;
    }

    .stat-card h2 {
        font-size: 24px;
    }

    .video-actions {
        flex-direction: column;
    }

    .delete-button {
        width: 100%;
        height: 44px;
    }
}
