:root {
    --bg: #f4f4f5;
    --sidebar: rgba(255, 255, 255, 0.82);
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --text: #18181b;
    --muted: #71717a;
    --border: rgba(0, 0, 0, 0.08);
    --hover: rgba(0, 0, 0, 0.05);
    --accent: #5b5bf7;
    --accent-hover: #4b4be5;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

body.dark {
    --bg: #101114;
    --sidebar: rgba(25, 26, 30, 0.88);
    --surface: rgba(28, 29, 34, 0.88);
    --surface-solid: #1c1d22;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --hover: rgba(255, 255, 255, 0.06);
    --accent: #7272ff;
    --accent-hover: #8282ff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

button,
input {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
    color: inherit;
}

.app {
    width: 100%;
    height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 255px;
    height: 100vh;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.brand {
    height: 52px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 28px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    box-shadow: 0 7px 20px rgba(91, 91, 247, 0.25);
}

.sidebar-group {
    margin-bottom: 25px;
}

.group-title {
    padding: 0 14px 9px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-item {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    color: var(--muted);
    font-size: 14px;
    transition: 0.18s ease;
}

.nav-item:hover {
    background: var(--hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--hover);
    color: var(--text);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.sidebar-bottom {
    margin-top: auto;
}


/* MAIN */

.main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

.topbar {
    height: 76px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-box {
    width: min(470px, 50%);
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-solid);
}

.search-icon {
    color: var(--muted);
    font-size: 20px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.round-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
}

.round-button:hover {
    background: var(--hover);
    color: var(--text);
}

.profile-button {
    height: 42px;
    padding: 0 10px 0 7px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 10px;
    background: transparent;
}

.profile-button:hover {
    background: var(--hover);
}

.avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.profile-name {
    font-size: 14px;
}

.chevron {
    color: var(--muted);
}


/* CONTENT */

.content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 48px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    position: relative;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -2.7px;
    margin-bottom: 20px;
}

.hero p {
    max-width: 570px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 16px;
    margin-bottom: 28px;
}

.hero-visual {
    width: 300px;
    height: 230px;
    display: grid;
    place-items: center;
}

.visual-card {
    width: 240px;
    height: 160px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 30%, rgba(114, 114, 255, 0.35), transparent 50%),
        linear-gradient(135deg, rgba(91, 91, 247, 0.12), rgba(255, 255, 255, 0.01));
    transform: rotate(4deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.visual-play {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    padding-left: 3px;
    box-shadow: 0 12px 30px rgba(91, 91, 247, 0.3);
}

.primary-button,
.secondary-button {
    height: 43px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.18s ease;
}

.primary-button {
    background: var(--accent);
    color: white;
}

.primary-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.secondary-button {
    background: var(--hover);
    color: var(--text);
}

.secondary-button:hover {
    background: var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 38px 0 16px;
}

.section-header h2 {
    font-size: 22px;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
}

.section-header p {
    color: var(--muted);
    font-size: 13px;
}

.video-grid {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.empty-state {
    text-align: center;
    max-width: 360px;
    padding: 40px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 17px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--hover);
    color: var(--muted);
    font-size: 22px;
}

.empty-state h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-state p {
    color: var(--muted);
    line-height: 1.5;
    font-size: 13px;
    margin-bottom: 20px;
}


/* MODAL */

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(6px);
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.upload-modal {
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-solid);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--hover);
    font-size: 22px;
    color: var(--muted);
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 24px;
}

.modal-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(91, 91, 247, 0.12);
    color: var(--accent);
    font-size: 21px;
}

.modal-title h2 {
    font-size: 21px;
    margin-bottom: 4px;
}

.modal-title p {
    color: var(--muted);
    font-size: 13px;
}

.drop-zone {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--border);
    border-radius: 15px;
    background: var(--hover);
    cursor: pointer;
    text-align: center;
    transition: 0.18s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(91, 91, 247, 0.06);
}

.drop-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-solid);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 22px;
}

.drop-zone h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.drop-zone p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 5px;
}

.drop-zone > span {
    color: var(--muted);
    font-size: 11px;
}

.file-preview {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--hover);
}

.file-preview.show {
    display: flex;
}

.preview-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: white;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-info strong,
.preview-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-info strong {
    font-size: 13px;
    margin-bottom: 4px;
}

.preview-info span {
    color: var(--muted);
    font-size: 11px;
}

#removeFile {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--hover);
    color: var(--muted);
}

.form-group {
    margin-top: 20px;
}

.form-group > label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.form-group input[type="text"] {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--hover);
    color: var(--text);
}

.form-group input[type="text"]:focus {
    border-color: var(--accent);
}

.visibility-options {
    display: grid;
    gap: 9px;
}

.visibility-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    cursor: pointer;
    transition: 0.18s ease;
}

.visibility-option:hover {
    background: var(--hover);
}

.visibility-option.selected {
    border-color: var(--accent);
    background: rgba(91, 91, 247, 0.06);
}

.visibility-option input {
    display: none;
}

.visibility-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--hover);
    font-size: 16px;
}

.visibility-option strong,
.visibility-option span {
    display: block;
}

.visibility-option strong {
    font-size: 13px;
    margin-bottom: 3px;
}

.visibility-option span {
    color: var(--muted);
    font-size: 11px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 25px;
}


/* TOAST */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 13px 17px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 200;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .sidebar {
        width: 76px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .brand span,
    .group-title,
    .nav-item span:last-child {
        display: none;
    }

    .brand {
        justify-content: center;
        padding: 0;
    }

    .nav-item {
        justify-content: center;
        padding: 0;
    }

    .nav-icon {
        width: auto;
    }

    .hero {
        padding: 35px;
    }

    .hero-visual {
        display: none;
    }

}

@media (max-width: 600px) {

    body {
        overflow: auto;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        padding: 0 16px;
    }

    .search-box {
        width: 100%;
    }

    .profile-button {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .hero {
        padding: 28px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 38px;
    }

    .section-header {
        align-items: flex-end;
    }
}