:root {
    --background: #070914;
    --background-secondary: #10172a;
    --surface: rgba(17, 23, 42, 0.92);
    --surface-muted: rgba(12, 17, 32, 0.65);

    --border: #313a59;
    --border-light: #4c5676;

    --text: #ffffff;
    --text-muted: #c5cbe0;

    --accent: #7c8cff;
    --accent-light: #9ba8ff;

    --success: #b4f1dc;
    --success-border: #3c8c72;

    --warning: #f4d889;
    --warning-border: #9c7d38;

    --info: #aac7ff;
    --info-border: #4e73bb;

    --danger: #ffb4c0;
    --danger-border: #a74355;

    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}


/* -------------------------------------------------
   Global styles
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(
            circle at top right,
            #242060 0,
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--background) 0%,
            var(--background-secondary) 100%
        );
    color: var(--text);
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

img {
    max-width: 100%;
}


/* -------------------------------------------------
   Shared text styles
-------------------------------------------------- */

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}


/* -------------------------------------------------
   Buttons
-------------------------------------------------- */

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.primary-button {
    border: 0;
    background: var(--accent);
    color: var(--text);
    cursor: pointer;
}

.secondary-button {
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(124, 140, 255, 0.35);
    outline-offset: 2px;
}


/* -------------------------------------------------
   Landing page
-------------------------------------------------- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 64px 8%;
}

.hero-content {
    max-width: 780px;
}

.hero h1 {
    max-width: 760px;
    margin-bottom: 0;
    font-size: clamp(48px, 8vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy {
    max-width: 650px;
    margin: 28px 0 36px;
    color: var(--text-muted);
    font-size: 21px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* -------------------------------------------------
   Authentication pages
-------------------------------------------------- */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 20px;
}

.auth-card {
    width: min(100%, 520px);
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-card h1 {
    margin-bottom: 12px;
    font-size: clamp(34px, 7vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-card form {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.auth-card label {
    margin-top: 10px;
    color: var(--text-muted);
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #0c1120;
    color: var(--text);
    font-size: 16px;
}

.auth-card input::placeholder {
    color: #7d859d;
}

.form-button {
    width: 100%;
    margin-top: 18px;
}

.form-error {
    margin: 18px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--danger-border);
    border-radius: 10px;
    background: rgba(167, 67, 85, 0.15);
    color: var(--danger);
    line-height: 1.45;
}

.form-success {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--success-border);
    border-radius: 10px;
    background: rgba(60, 140, 114, 0.16);
    color: var(--success);
}

.form-success p {
    margin: 6px 0 0;
}

.auth-switch {
    margin-top: 24px;
    color: var(--text-muted);
    line-height: 1.5;
}

.auth-switch a {
    color: var(--accent-light);
    font-weight: 700;
}


/* -------------------------------------------------
   Dashboard
-------------------------------------------------- */

.dashboard {
    width: min(100%, 1200px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 64px 8%;
}

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

.dashboard-header h1 {
    max-width: 760px;
    margin-bottom: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.dashboard-card {
    width: 100%;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    margin-bottom: 14px;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.dashboard-card p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
}

.dashboard-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.dashboard-intro p {
    max-width: 650px;
}


/* -------------------------------------------------
   Video library
-------------------------------------------------- */

.video-library {
    margin-top: 42px;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: -0.04em;
}

.video-list {
    display: grid;
    gap: 16px;
}

.video-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.video-card-main {
    min-width: 0;
}

.video-card h3 {
    margin-bottom: 8px;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.video-game {
    margin-bottom: 8px;
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.video-date,
.report-pending {
    margin-bottom: 0;
    color: var(--text-muted);
}

.video-status {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-waiting {
    border: 1px solid var(--warning-border);
    background: rgba(156, 125, 56, 0.16);
    color: var(--warning);
}

.status-processing {
    border: 1px solid var(--info-border);
    background: rgba(78, 115, 187, 0.16);
    color: var(--info);
}

.status-complete {
    border: 1px solid var(--success-border);
    background: rgba(60, 140, 114, 0.16);
    color: var(--success);
}

.status-failed {
    border: 1px solid var(--danger-border);
    background: rgba(167, 67, 85, 0.15);
    color: var(--danger);
}

.empty-state {
    padding: 48px;
    border: 1px dashed var(--border-light);
    border-radius: 18px;
    background: rgba(12, 17, 32, 0.45);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 12px;
    font-size: 28px;
}

.empty-state p {
    max-width: 580px;
    margin: 0 auto 26px;
    color: var(--text-muted);
    line-height: 1.6;
}


/* -------------------------------------------------
   Gameplay upload page
-------------------------------------------------- */

.upload-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 20px;
}

.upload-card {
    width: min(100%, 900px);
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.upload-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 32px;
}

.upload-header h1 {
    margin-bottom: 18px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.upload-description {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
}

.upload-form {
    display: grid;
    gap: 20px;
}

.upload-dropzone {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
    border: 2px dashed var(--border-light);
    border-radius: 16px;
    background: var(--surface-muted);
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}

.upload-dropzone:hover {
    border-color: var(--accent);
    background: rgba(124, 140, 255, 0.08);
    transform: translateY(-1px);
}

.upload-dropzone input {
    width: min(100%, 420px);
    margin-top: 12px;
    color: var(--text-muted);
}

.upload-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(124, 140, 255, 0.15);
    color: var(--accent-light);
    font-size: 30px;
    font-weight: 700;
}

.upload-title {
    font-size: 22px;
    font-weight: 700;
}

.upload-help {
    color: var(--text-muted);
    line-height: 1.5;
}

.upload-button {
    width: 100%;
}


/* -------------------------------------------------
   Responsive design
-------------------------------------------------- */

@media (max-width: 700px) {
    .hero {
        padding: 48px 24px;
    }

    .hero-copy {
        font-size: 18px;
    }

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

    .hero-actions .primary-button,
    .hero-actions .secondary-button {
        width: 100%;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .dashboard {
        padding: 48px 24px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header form,
    .dashboard-header .secondary-button {
        width: 100%;
    }

    .dashboard-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-intro .primary-button {
        width: 100%;
    }

    .video-card {
        align-items: stretch;
        flex-direction: column;
    }

    .video-status {
        align-items: flex-start;
    }

    .upload-card {
        padding: 28px 22px;
    }

    .upload-header {
        flex-direction: column;
    }

    .upload-header .secondary-button {
        width: 100%;
    }

/* -------------------------------------------------
   Dashboard polish
-------------------------------------------------- */

.dashboard-message {
    margin-bottom: 24px;
    padding: 15px 18px;
    border: 1px solid var(--success-border);
    border-radius: 12px;
    background: rgba(60, 140, 114, 0.16);
    color: var(--success);
    font-weight: 700;
}

.card-label {
    margin-bottom: 10px !important;
    color: var(--accent-light) !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.upload-count {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-weight: 700;
}

.video-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
}

.video-thumbnail {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(124, 140, 255, 0.18),
            rgba(36, 32, 96, 0.3)
        );
}

.video-thumbnail span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 50%;
    background: var(--accent);
    font-size: 14px;
}

.video-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.metadata-divider {
    color: var(--border-light);
}

.video-actions {
    min-width: 190px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}

.small-button {
    min-height: 40px;
    padding: 9px 16px;
    font-size: 14px;
}

.delete-button {
    background: transparent;
    border: none;
    color: #ff6b81;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
    padding: 0;
}

.delete-button:hover {
    color: #ff4757;
    transform: translateY(-1px);
}

.delete-button:active {
    transform: translateY(0);
}

.status-waiting::before,
.status-processing::before,
.status-complete::before,
.status-failed::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: currentColor;
}

.empty-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(124, 140, 255, 0.15);
    color: var(--accent-light);
    font-size: 30px;
    font-weight: 700;
}

@media (max-width: 800px) {
    .video-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .video-thumbnail {
        width: 64px;
        height: 64px;
    }

    .video-actions {
        grid-column: 1 / -1;
        min-width: 0;
        align-items: flex-start;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 520px) {
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .video-thumbnail {
        width: 100%;
        height: 110px;
    }

    .metadata-divider {
        display: none;
    }

    .video-metadata {
        flex-direction: column;
        gap: 4px;
    }
}

/* -------------------------------------------------
   Gameplay report
-------------------------------------------------- */

.report-page {
    width: min(100%, 1240px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 64px 8%;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 42px;
}

.report-header h1 {
    max-width: 850px;
    margin-bottom: 14px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
    overflow-wrap: anywhere;
}

.report-subtitle {
    color: var(--text-muted);
    font-size: 17px;
}

.report-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.report-status-card h2 {
    margin-bottom: 0;
    font-size: 30px;
}

.report-section {
    margin-top: 48px;
}

.metadata-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.metadata-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

.metadata-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.metadata-card strong {
    font-size: 22px;
}

.frame-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.frame-card {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.frame-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    background: #050711;
}

.frame-card figcaption {
    padding: 13px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.analysis-placeholder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.analysis-score {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: rgba(124, 140, 255, 0.12);
    color: var(--accent-light);
    font-size: 34px;
    font-weight: 700;
}

.analysis-placeholder h3 {
    margin-bottom: 10px;
    font-size: 26px;
}

.analysis-placeholder p {
    margin-bottom: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

@media (max-width: 700px) {
    .report-page {
        padding: 48px 24px;
    }

    .report-header,
    .report-status-card {
        align-items: stretch;
        flex-direction: column;
    }

    .report-header .secondary-button {
        width: 100%;
    }

    .analysis-placeholder {
        grid-template-columns: 1fr;
    }
}
/* -------------------------------------------------
   Computer vision results
-------------------------------------------------- */

.vision-summary {
    margin-top: 20px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.vision-summary h3 {
    margin-bottom: 14px;
    font-size: 24px;
}

.vision-summary ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--text-muted);
    line-height: 1.6;
}

.vision-summary li::marker {
    color: var(--accent-light);
}
/* -------------------------------------------------
   Semantic AI vision results
-------------------------------------------------- */

.semantic-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.semantic-summary-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.semantic-summary-card h3 {
    margin: 0 0 18px;
    font-size: 20px;
}

.semantic-stat-list {
    display: grid;
    gap: 12px;
}

.semantic-stat-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.semantic-stat-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.semantic-stat-list span {
    color: var(--text-muted);
}

.semantic-detection-group {
    margin-top: 24px;
}

.semantic-detection-group h3 {
    margin: 0 0 12px;
    font-size: 19px;
}

.semantic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.semantic-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 700;
}

.semantic-observations {
    margin-top: 32px;
}

.semantic-frame-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.semantic-frame-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.semantic-frame-image-link {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #090b10;
}

.semantic-frame-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.semantic-frame-image-link:hover .semantic-frame-image {
    transform: scale(1.025);
}

.semantic-frame-content {
    padding: 20px;
}

.semantic-frame-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.semantic-frame-heading strong {
    overflow-wrap: anywhere;
}

.semantic-scene-badge {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised, var(--surface));
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.semantic-frame-content p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.semantic-frame-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.semantic-frame-details span {
    color: var(--text-muted);
    font-size: 13px;
}

.semantic-frame-details strong {
    color: var(--text);
}

.semantic-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.semantic-flags span {
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 700;
}

.semantic-confidence {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.muted-text {
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .semantic-summary-grid,
    .semantic-frame-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .semantic-frame-details {
        grid-template-columns: 1fr;
    }

    .semantic-frame-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* -------------------------------------------------
   Live dashboard video status
-------------------------------------------------- */

.video-progress-section {
    max-width: 620px;
    margin-top: 20px;
}

.video-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 9px;
}

.video-current-stage {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.video-progress-value {
    flex-shrink: 0;
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 800;
}

.video-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
}

.video-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-light)
        );
    transition: width 400ms ease;
}

.video-status-message {
    margin: 9px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.status-message-error {
    color: var(--danger);
}

.report-pending {
    max-width: 220px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: right;
}

.refresh-status-button {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 13px;
}

.refresh-status-button:disabled {
    cursor: wait;
    opacity: 0.55;
    transform: none;
}

.report-button {
    text-align: center;
}

.is-hidden {
    display: none !important;
}

.video-card[data-current-status="complete"],
.video-card[data-current-status="completed"] {
    border-color: rgba(60, 140, 114, 0.7);
}

.video-card[data-current-status="failed"],
.video-card[data-current-status="error"] {
    border-color: rgba(167, 67, 85, 0.75);
}

@media (max-width: 800px) {
    .video-progress-section {
        max-width: none;
    }

    .report-pending {
        max-width: none;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .video-progress-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .video-actions,
    .video-actions form,
    .video-actions .secondary-button {
        width: 100%;
    }

    .video-actions .secondary-button {
        justify-content: center;
    }

    .delete-button {
        width: 100%;
        padding: 9px 0;
        text-align: left;
    }
    }
    /* -------------------------------------------------
   Professional coaching report
-------------------------------------------------- */

.coaching-report-section {
    padding-bottom: 36px;
}

.coaching-quality-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--success-border);
    border-radius: 999px;
    background: rgba(60, 140, 114, 0.14);
    color: var(--success);
    font-size: 13px;
    font-weight: 800;
}

.coaching-hero {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 22px;
}

.coaching-score-panel,
.coaching-summary-panel {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.coaching-score-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.coaching-score-ring {
    width: 172px;
    height: 172px;
    display: grid;
    place-content: center;
    border: 10px solid rgba(124, 140, 255, 0.22);
    border-top-color: var(--accent);
    border-right-color: var(--accent-light);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(124, 140, 255, 0.16),
            transparent 68%
        );
    box-shadow:
        inset 0 0 35px rgba(124, 140, 255, 0.12),
        0 18px 40px rgba(0, 0, 0, 0.28);
}

.coaching-score-ring strong {
    display: block;
    font-size: 58px;
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.coaching-score-ring span {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.coaching-score-label {
    margin: 20px 0 12px;
    font-size: 17px;
    font-weight: 800;
}

.evidence-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.evidence-supported {
    border: 1px solid var(--success-border);
    background: rgba(60, 140, 114, 0.14);
    color: var(--success);
}

.evidence-limited {
    border: 1px solid var(--warning-border);
    background: rgba(156, 125, 56, 0.15);
    color: var(--warning);
}

.coaching-summary-panel {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.coaching-summary-panel h3 {
    margin-bottom: 16px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.coaching-summary-copy {
    max-width: 820px;
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.7;
}

.coaching-summary-stats {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(120px, 1fr));
    gap: 12px;
}

.coaching-summary-stats div {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.coaching-summary-stats span {
    min-height: 34px;
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.coaching-summary-stats strong {
    font-size: 25px;
}

.coaching-subsection {
    margin-top: 34px;
}

.coaching-subsection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.coaching-subsection-heading h3 {
    margin-bottom: 0;
    font-size: clamp(25px, 4vw, 34px);
    letter-spacing: -0.03em;
}

.coaching-subsection-heading > p {
    max-width: 520px;
    margin-bottom: 3px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: right;
}

.category-score-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.category-score-card {
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

.category-score-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.category-score-heading span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.category-score-heading strong {
    font-size: 22px;
}

.category-score-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.category-score-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-light)
        );
    transition: width 500ms ease;
}

.coaching-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.coaching-item-list {
    display: grid;
    gap: 15px;
}

.coaching-item-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.coaching-strength-card {
    border-left: 4px solid var(--success-border);
}

.coaching-mistake-card {
    border-left: 4px solid var(--danger-border);
}

.coaching-item-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.coaching-item-heading h4 {
    margin: 9px 0 0;
    font-size: 21px;
}

.coaching-item-type {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.strength-type {
    background: rgba(60, 140, 114, 0.16);
    color: var(--success);
}

.mistake-type {
    background: rgba(167, 67, 85, 0.16);
    color: var(--danger);
}

.confidence-badge {
    flex-shrink: 0;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.coaching-category {
    margin: 15px 0 10px;
    color: var(--accent-light);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.coaching-evidence {
    margin-bottom: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.mistake-detail {
    margin-top: 16px;
}

.mistake-detail span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mistake-detail p {
    margin: 0;
    line-height: 1.6;
}

.recommendation-detail {
    padding: 14px;
    border: 1px solid rgba(124, 140, 255, 0.28);
    border-radius: 12px;
    background: rgba(124, 140, 255, 0.08);
}

.recommendation-detail span {
    color: var(--accent-light);
}

.evidence-reference-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.evidence-reference-list span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.priority-section {
    padding: 28px;
    border: 1px solid rgba(124, 140, 255, 0.36);
    border-radius: 19px;
    background:
        linear-gradient(
            135deg,
            rgba(124, 140, 255, 0.11),
            rgba(17, 23, 42, 0.88)
        );
}

.priority-action-list {
    display: grid;
    gap: 13px;
}

.priority-action-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 17px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(7, 9, 20, 0.5);
}

.priority-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    font-size: 17px;
    font-weight: 900;
}

.priority-action-card h4 {
    margin: 0 0 8px;
    font-size: 19px;
}

.priority-action-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.uncertainty-section {
    padding: 24px;
    border: 1px solid var(--warning-border);
    border-radius: 17px;
    background: rgba(156, 125, 56, 0.08);
}

.uncertain-observation-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--text-muted);
    line-height: 1.6;
}

.quality-section {
    padding-top: 8px;
}

.quality-metric-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 13px;
}

.quality-metric-grid article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.quality-metric-grid span {
    min-height: 34px;
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.quality-metric-grid strong {
    font-size: 25px;
}

.coaching-empty-state {
    padding: 22px;
    border: 1px dashed var(--border-light);
    border-radius: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

.coaching-report-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 30px;
    border: 1px dashed var(--border-light);
    border-radius: 18px;
    background: var(--surface-muted);
}

.coaching-report-empty-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: rgba(124, 140, 255, 0.13);
    color: var(--accent-light);
    font-size: 23px;
    font-weight: 900;
}

.coaching-report-empty h3 {
    margin-bottom: 10px;
    font-size: 27px;
}

.coaching-report-empty p:not(.card-label) {
    max-width: 720px;
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.65;
}

@media (max-width: 1050px) {
    .coaching-summary-stats {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

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

@media (max-width: 760px) {
    .coaching-hero {
        grid-template-columns: 1fr;
    }

    .coaching-subsection-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .coaching-subsection-heading > p {
        text-align: left;
    }
}

@media (max-width: 540px) {
    .coaching-score-panel,
    .coaching-summary-panel,
    .priority-section {
        padding: 22px;
    }

    .coaching-summary-stats {
        grid-template-columns: 1fr;
    }

    .coaching-item-heading {
        flex-direction: column;
    }

    .priority-action-card {
        grid-template-columns: 1fr;
    }

    .coaching-report-empty {
        grid-template-columns: 1fr;
    }
}
/* -------------------------------------------------
   Gameplay evidence timeline
-------------------------------------------------- */

.timeline-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.timeline-summary-grid article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.timeline-summary-grid span {
    min-height: 34px;
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.timeline-summary-grid strong {
    font-size: 21px;
}

.gameplay-timeline {
    display: grid;
}

.timeline-entry {
    display: grid;
    grid-template-columns:
        22px
        minmax(80px, 110px)
        minmax(0, 1fr);
    gap: 17px;
}

.timeline-marker-column {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.timeline-marker {
    position: relative;
    z-index: 2;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 25px;
    border: 3px solid var(--accent-light);
    border-radius: 50%;
    background: var(--background);
    box-shadow:
        0 0 0 5px rgba(124, 140, 255, 0.12);
}

.timeline-line {
    width: 2px;
    flex: 1;
    min-height: 30px;
    background:
        linear-gradient(
            var(--accent),
            rgba(124, 140, 255, 0.12)
        );
}

.timeline-time-column {
    padding-top: 21px;
}

.timeline-time-column strong {
    display: block;
    color: var(--accent-light);
    font-size: 17px;
}

.timeline-time-column span {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.timeline-entry-card {
    display: grid;
    grid-template-columns:
        minmax(210px, 310px)
        minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.timeline-frame-link {
    display: block;
    min-height: 210px;
    overflow: hidden;
    background: #080a12;
}

.timeline-frame-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 180ms ease;
}

.timeline-frame-link:hover img {
    transform: scale(1.03);
}

.timeline-entry-content {
    padding: 24px;
}

.timeline-entry-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.timeline-entry-heading h3 {
    margin: 10px 0 0;
    font-size: 22px;
    line-height: 1.25;
}

.timeline-scene-badge {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(124, 140, 255, 0.35);
    border-radius: 999px;
    background: rgba(124, 140, 255, 0.1);
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timeline-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 13px;
}

.timeline-detail-list strong {
    color: var(--text);
}

.timeline-evidence-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.timeline-evidence-flags span {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.timeline-view-frame {
    display: inline-flex;
    margin-top: 20px;
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.timeline-view-frame:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .timeline-entry-card {
        grid-template-columns: 1fr;
    }

    .timeline-frame-link {
        min-height: 260px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 650px) {
    .timeline-entry {
        grid-template-columns:
            18px
            minmax(0, 1fr);
        gap: 13px;
    }

    .timeline-time-column {
        grid-column: 2;
        padding-top: 15px;
    }

    .timeline-entry-card {
        grid-column: 2;
    }

    .timeline-marker-column {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .timeline-entry-heading {
        flex-direction: column;
    }

    .timeline-frame-link {
        min-height: 190px;
    }
}

/* -------------------------------------------------
   Kratria Coach Chat
-------------------------------------------------- */

.coach-chat-section {
    margin-top: 48px;
}

.coach-chat-panel {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.coach-chat-introduction {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.coach-chat-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 22px;
}

.coach-chat-input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: #0c1120;
    color: var(--text);
}

.coach-chat-input::placeholder {
    color: #7d859d;
}

.coach-chat-input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(124, 140, 255, 0.2);
    outline-offset: 1px;
}

.coach-chat-submit {
    min-width: 140px;
    min-height: 52px;
    padding: 14px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.coach-chat-submit:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.coach-chat-submit:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.coach-chat-status {
    min-height: 22px;
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.coach-chat-status.is-error {
    color: var(--danger);
}

.coach-chat-response {
    margin-top: 24px;
}

.coach-chat-answer-card {
    padding: 22px;
    border: 1px solid rgba(124, 140, 255, 0.35);
    border-radius: 16px;
    background: rgba(124, 140, 255, 0.08);
}

.coach-chat-answer-label {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-light);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.coach-chat-answer {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
}

.coach-chat-evidence-heading {
    margin: 24px 0 14px;
    font-size: 24px;
}

.coach-chat-evidence-grid {
    display: grid;
    gap: 16px;
}

.coach-chat-evidence-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.coach-chat-evidence-card > a {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #080a12;
}

.coach-chat-evidence-image {
    width: 100%;
    height: 110px;
    display: block;
    object-fit: cover;
    transition: transform 180ms ease;
}

.coach-chat-evidence-card > a:hover .coach-chat-evidence-image {
    transform: scale(1.03);
}

.coach-chat-evidence-content {
    min-width: 0;
}

.coach-chat-evidence-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.coach-chat-evidence-meta span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.coach-chat-evidence-description {
    margin: 0 0 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.coach-chat-frame-link {
    color: var(--accent-light);
    font-weight: 800;
    text-decoration: none;
}

.coach-chat-frame-link:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .coach-chat-form {
        flex-direction: column;
    }

    .coach-chat-submit {
        width: 100%;
    }

    .coach-chat-evidence-card {
        grid-template-columns: 1fr;
    }

    .coach-chat-evidence-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 520px) {
    .coach-chat-panel {
        padding: 22px;
    }
}
}

/* -------------------------------------------------
   Sprint 17 Part 7B - AI Coach allowance + UX
-------------------------------------------------- */

.coach-chat-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.coach-chat-topline .coach-chat-introduction {
    margin-bottom: 0;
}

.coach-chat-access {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
}

.coach-chat-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.coach-chat-plan-badge.is-pro {
    border-color: rgba(124, 140, 255, 0.55);
    background: rgba(124, 140, 255, 0.14);
    color: var(--accent-light);
}

.coach-chat-quota-text {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.coach-chat-suggestions {
    margin: 0 0 18px;
}

.coach-chat-suggestions-label {
    display: block;
    margin-bottom: 9px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.coach-chat-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-chat-suggestion {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(124, 140, 255, 0.06);
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.coach-chat-suggestion:hover {
    border-color: var(--accent);
    background: rgba(124, 140, 255, 0.12);
    color: var(--text);
    transform: translateY(-1px);
}

.coach-chat-suggestion:disabled {
    cursor: wait;
    opacity: 0.55;
    transform: none;
}

.coach-chat-submit:disabled {
    cursor: wait;
}

@media (max-width: 760px) {
    .coach-chat-topline {
        align-items: stretch;
        flex-direction: column;
    }

    .coach-chat-access {
        width: fit-content;
        max-width: 100%;
    }
}
