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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    min-height: 100vh;
    color: #1d1d1f;
    display: flex;
    flex-direction: column;
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(229, 9, 20, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(37, 99, 235, 0.04) 0%, transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
    z-index: -1;
}

.header {
    padding: 28px 48px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #e50914;
    text-decoration: none;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.logo:hover {
    color: #b20710;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.subtitle {
    color: #6e6e73;
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #3a3a3c;
    margin-bottom: 7px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
    color: #1d1d1f;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    background: #ffffff;
    border-color: #e50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

input::placeholder {
    color: #9e9e9e;
}

.password-wrap {
    position: relative;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #86868b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-pass:hover {
    color: #1d1d1f;
}

.toggle-pass svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #5a5a5c;
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #e50914;
    cursor: pointer;
}

a {
    color: #e50914;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

a:hover {
    color: #b20710;
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: #e50914;
    color: #fff;
    margin-bottom: 14px;
}

.btn-primary:hover {
    background: #b20710;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
    margin-bottom: 12px;
}

.btn-secondary:hover {
    background: #f5f5f7;
    text-decoration: none;
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.divider {
    display: flex;
    align-items: center;
    color: #9e9e9e;
    font-size: 13px;
    margin: 22px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.divider span {
    padding: 0 15px;
}

.signup {
    text-align: center;
    color: #6e6e73;
    font-size: 14px;
    margin-top: 20px;
}

.error {
    display: none;
    background: rgba(229, 9, 20, 0.06);
    border: 1px solid rgba(229, 9, 20, 0.2);
    color: #c41e2a;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

.error svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.success {
    display: none;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #15803d;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

.success svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.info-box {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.info-box svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
    margin-bottom: 14px;
}

.info-box h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.info-box p {
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.5;
}

.code-block {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 12px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #6e6e73;
    margin-top: 12px;
    word-break: break-all;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.footer {
    text-align: center;
    padding: 30px 20px;
    color: #9e9e9e;
    font-size: 12px;
}

.footer a {
    color: #6e6e73;
    margin: 0 10px;
    font-size: 12px;
}

.footer a:hover {
    color: #1d1d1f;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: #6e6e73;
    font-size: 14px;
}

.back-link:hover {
    color: #1d1d1f;
}

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

.content-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 48px 56px;
    width: 100%;
    max-width: 780px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.content-card h1 {
    font-size: 32px;
    margin-bottom: 24px;
}

.content-card h2 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.content-card p,
.content-card li {
    color: #3a3a3c;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.content-card ul,
.content-card ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.content-card li {
    margin-bottom: 8px;
}

.content-card a {
    color: #e50914;
}

.content-card a:hover {
    color: #b20710;
}

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

.sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 24px 0;
    flex-shrink: 0;
}

.sidebar .logo {
    padding: 0 24px 24px;
    font-size: 22px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #3a3a3c;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(229, 9, 20, 0.05);
    color: #e50914;
    border-left-color: #e50914;
    text-decoration: none;
}

.sidebar-nav li a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.dashboard-main {
    flex: 1;
    padding: 32px 40px;
    background: #f5f5f7;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 28px;
    color: #1d1d1f;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #3a3a3c;
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e50914;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card h3 {
    font-size: 13px;
    color: #6e6e73;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}

.section-card h2 {
    font-size: 18px;
    margin-bottom: 18px;
    color: #1d1d1f;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.video-thumb {
    background: #f5f5f7;
    border-radius: 10px;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.video-thumb svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.video-meta {
    font-size: 12px;
    color: #6e6e73;
}

.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h1 {
    font-size: 80px;
    color: #e50914;
    margin-bottom: 8px;
}

.not-found p {
    color: #6e6e73;
    font-size: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .dashboard-main { padding: 24px; }
}

@media (max-width: 520px) {
    .header { padding: 22px 24px; }
    .card { padding: 32px 24px; }
    .content-card { padding: 32px 24px; }
    h1 { font-size: 22px; }
    .content-card h1 { font-size: 26px; }
}
