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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: #0f0f13;
    color: #e0e0e8;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-box {
    background: #1a1a24;
    border: 1px solid #2a2a38;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
}
.login-box h1 { font-size: 1.5rem; color: #a78bfa; margin: 0 0 .4rem; }
.login-sub { color: #6b7280; margin: 0 0 1.5rem; font-size: .9rem; }
.login-box input[type=password] {
    width: 100%;
    padding: .7rem 1rem;
    background: #0f0f13;
    border: 1px solid #2a2a38;
    border-radius: 6px;
    color: #e0e0e8;
    font-size: 1rem;
    margin-bottom: .8rem;
    display: block;
}
.login-box input[type=password]:focus { outline: none; border-color: #7c3aed; }
.login-box button { width: 100%; justify-content: center; padding: .7rem 1rem; font-size: 1rem; }
.error { color: #f87171; font-size: .9rem; margin: -.5rem 0 1rem; }

/* Header */
.site-header {
    background: #1a1a24;
    border-bottom: 1px solid #2a2a38;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}
.site-title { font-weight: 700; color: #a78bfa; font-size: 1.1rem; text-decoration: none; }
.header-actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s;
}
.btn-primary  { background: #7c3aed; color: #fff; }
.btn-primary:hover { background: #6d28d9; }
.btn-ghost    { background: transparent; color: #9ca3af; border: 1px solid #2a2a38; }
.btn-ghost:hover { background: #1a1a24; color: #e0e0e8; }
.btn-danger   { background: #7f1d1d; color: #fca5a5; }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }

/* Add form */
.add-form {
    background: #1a1a24;
    border-bottom: 1px solid #2a2a38;
    padding: 1.5rem 24px;
}
.hidden { display: none !important; }

/* Form elements */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 960px;
    margin: 0 auto 12px;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group--full { grid-column: 1 / -1; }
.form-group label { font-size: .8rem; color: #9ca3af; font-weight: 500; }
.form-group input,
.form-group textarea {
    background: #0f0f13;
    border: 1px solid #2a2a38;
    border-radius: 6px;
    color: #e0e0e8;
    padding: .5rem .75rem;
    font-size: .9rem;
    font-family: inherit;
    width: 100%;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: #7c3aed; }
.form-actions {
    display: flex;
    gap: 8px;
    max-width: 960px;
    margin: 0 auto;
}

/* Content */
.content {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 24px;
}
.video-count { color: #6b7280; font-size: .85rem; margin-bottom: 16px; }
.empty-state { text-align: center; padding: 4rem 0; color: #4b5563; }

/* Video card */
.video-card {
    background: #1a1a24;
    border: 1px solid #2a2a38;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}
.video-player {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}
.video-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-info { padding: 16px 20px; }
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.video-title { font-size: 1.1rem; font-weight: 600; color: #e0e0e8; margin: 0 0 4px; }
.video-title-link { color: inherit; text-decoration: none; }
.video-title-link:hover { color: #a78bfa; }
.video-models { font-size: .85rem; color: #9ca3af; margin: 0; }
.video-actions { display: flex; gap: 6px; flex-shrink: 0; }
.video-notes {
    background: #0f0f13;
    border-left: 3px solid #7c3aed;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 0 0 12px;
}
.notes-label { font-size: .75rem; color: #7c3aed; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 4px; }
.video-notes p { margin: 0; color: #d1d5db; font-size: .9rem; }
.notes-read-more { display: inline-block; margin-top: 8px; font-size: .85rem; color: #7c3aed; text-decoration: none; }
.notes-read-more:hover { color: #a78bfa; }
.edit-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid #2a2a38; }
.video-date { font-size: .75rem; color: #4b5563; margin: 8px 0 0; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
}
.checkbox-label input[type=checkbox] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #7c3aed;
    cursor: pointer;
    vertical-align: middle;
}

.badge-hidden {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #451a03;
    color: #fb923c;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
}
