/* Global layout */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #0f172a; /* dark slate */
    /*background: #f5f5f5;*/
    background-color: #f8fafc; /* very light gray */
}

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    font-weight: 600;
    color: #0f172a;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 17px;
}

p {
    margin: 0 0 0.6em;
}

/* Small helper for meta lines (dates, views, etc.) */
.text-meta {
    font-size: 16px;
    color: #6b7280;  /* gray-500 */
}


header {
    background: #800000;
    color: #fff;
    padding: 8px 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* === HEADER BASE === */

.site-header {
    /*background: #0f172a;*/
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.header-inner {
   /* max-width: 1100px;*/
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Left side: logo + text */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffebee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}
.logo-img {
    width: 72px;      /* adjust if needed */
    height: 72px;
    object-fit: contain;
    display: block;
}

@media (max-width: 600px) {
    .logo-img {
        width: 34px;
        height: 34px;
    }
}

/* Manthan logo next to text */
.portal-name .manthan {
    height: 48px;
    /*vertical-align: middle;*/
    margin-left: 4px;
}

.logo-img:hover {
    filter: brightness(1.15);
    transition: filter 0.2s ease;
}


.brand-text {
    display: flex;
    flex-direction: column;
}

.portal-name {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.portal-subtitle {
    font-size: 18px;
    opacity: 0.9;
    padding-top: 4px;
    /*color: #cbd5f5;*/
}

header h1 {
    margin: 0;
    font-size: 22px;
}

main {
    padding: 20px 24px;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;    
}

@media (max-width: 640px) {
    main {
        padding: 12px 12px 24px;
    }
}


/* Homepage video list */
/* Base card styling – you probably already have something similar */
.video-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e2e6f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

/* Ensure the whole card feels clickable */
.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Thumbnail wrapper for overflow + image zoom */
.video-thumb-wrapper {
    position: relative;
    overflow: hidden;
}


/* Hover state: lift card + stronger shadow + slight image zoom */
.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
    border-color: #cbd5f5;
    cursor: pointer;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.03);
}

.video-thumb {
    margin-bottom: 6px;
    position: relative;
}

/* Thumbnail image transition */
.video-thumb {
    width: 100%;
    display: block;
    transition: transform 0.2s ease;
}

.video-thumb img {
    width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    max-height: 180px;
}


.video-thumb-wrapper {
    position: relative;
    overflow: hidden;
}

/* Overlay stays hidden until hover */
.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(15, 23, 42, 0.35),
        rgba(15, 23, 42, 0.65));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    border-radius: 8px;
}

.video-play-icon {
    font-size: 28px;
    color: #ffffff;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

/* Show overlay on card hover */
.video-card:hover .video-thumb-overlay {
    opacity: 1;
}


.video-duration-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

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

/* Tablets / small screens */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones: 1 column */
@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-title {
    font-size: 18px;
    margin: 0 0 4px 0;
}

.video-title a {
    text-decoration: none;
    color: inherit;
}

.video-title a:hover {
    text-decoration: underline;
}

.video-meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.video-desc,
.description {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
}

/* Watch page specific */
.watch-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.metadata {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Responsive video */
video {
    max-width: 100%;
    border-radius: 6px;
    background: #000;
}

/* nav bar style */
nav {
    margin-top: 8px;
    position: relative;
}

.nav-links {
    display: flex;
    gap: 16px;
    font-size: 18px;
    align-items: center;
    position: absolute;
    top: 0px;
    right: 0px;
}

.nav-links a {
    font-size: 18px;
    text-decoration: none;
    color: #e5e7eb;
    padding: 6px 16px;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
    /*background-color: rgba(148, 163, 184, 0.2);*/
    /*background-color: #2563eb;*/
    background-color: #591002;
    color: #ffffff;
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 32px;
    padding: 4px 8px;
    cursor: pointer;
}

/* === HEADER: MOBILE LAYOUT === */

@media (max-width: 768px) {
    .header-inner {
        align-items: center;
    }

    /* Show hamburger on mobile */
    .nav-toggle {
        display: block;
    }

    /* Hide nav-links by default, and make them a dropdown panel */
    .nav-links {
        position: absolute;
        top: 56px;           /* just below header */
        /*left: 0;*/
        right: 0;
        /*background: #020617;*/
	background: #800000;
        padding: 8px 16px 12px;
        display: none;
        flex-direction: column;
        gap: 8px;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.5);
        z-index: 50;
    }

    .nav-links a {
        display: block;
        padding: 8px 10px;
        border-radius: 6px;
        font-size: 18px;
    }

    /* When we add 'open' class via JS, show the menu */
    .nav-links.open {
        display: flex;
    }
}

/* Course meta data */
.course-meta {
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

.course-meta a:hover {
    text-decoration: none;
}


/* Footer */
footer {
    margin-top: 24px;
    padding: 12px 24px;
    background: #e0e0e0;
    font-size: 12px;
    color: #444;
}

footer a {
    color: inherit;
    text-decoration: underline;
}

footer a:hover {
    text-decoration: none;
}

/* Watch page layout */
.watch-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

/* WATCH PAGE responsiveness */
@media (max-width: 640px) {
    .watch-container {
        padding: 0;
        width: 100%;
    }

    .watch-container video {
        width: 100% !important;
        height: auto !important;
    }
}


.watch-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.watch-video {
    margin-bottom: 16px;
}

.watch-meta {
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
}

.watch-desc {
    font-size: 15px;
    line-height: 1.4;
    margin-top: 12px;
}

/* Card */

.watch-meta-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.04);
    font-size: 13px;
    color: #0f172a;
}

/* Rows */

.watch-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.watch-meta-row:last-child {
    margin-bottom: 0;
}

/* Labels / values */

.watch-meta-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.watch-meta-value {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

/* Type pill */

.watch-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    text-transform: capitalize;
    font-weight: 600;
}

/* Links */

.watch-meta-card a {
    color: #2563eb;
    text-decoration: none;
}

.watch-meta-card a:hover {
    text-decoration: underline;
}

/* Like block */

.watch-like {
    margin: 8px 0 4px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.15em; /* slight baseline alignment */
}

.watch-like-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.watch-like-button {
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .08s ease;
}

.watch-like-button--active {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.watch-like-button:hover {
    transform: translateY(-1px);
}

.watch-like-count {
    font-size: 13px;
    color: #6b7280;
}


/* Small-screen tweak */

@media (max-width: 640px) {
    .watch-meta-card {
        padding: 12px 14px;
    }

    .watch-meta-row {
        gap: 4px;
    }
}







/* Admin table for video edit */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: left;
}

.admin-table th {
    background-color: #eeeeee;
}

.admin-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.admin-table a {
    color: #1976d2;
    text-decoration: none;
}

.admin-table a:hover {
    text-decoration: underline;
}

/* Manthan image */
.manthan {
    width: 48px;
    vertical-align: bottom;
}


.player-shell {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Base: CC container visible, but we can fade it out */
.cc-settings-container {
    position: absolute;
    right: 14px;
    bottom: 50px; /* tweak this to sit just above the native controls */
    margin-top: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* When UI is hidden, fade out the gear and ignore clicks */
.player-shell.cc-ui-hidden .cc-settings-container {
    opacity: 0;
    pointer-events: none;
}


/* Make the button a small circular gear overlay */
.cc-settings-button {
    width: 26px;
    height: 26px;
    margin-bottom: 5px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.cc-settings-button:hover {
    color: #2563eb;         /* blue-ish (Firefox-ish) */
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.cc-gear-icon {
    font-size: 32px;               /* slightly smaller so it fits the circle */
    line-height: 1;
    display: block;
    /*margin-top: 1px;*/
    margin-bottom: 7px;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Helvetica Neue", Arial, sans-serif;
}

/*.cc-settings-button { width: 32px; height: 32px; }*/
.cc-settings-button { line-height: 1; }


/* Keep panel styling as before, but now it will pop out from the gear */

.cc-settings-panel {
  position: absolute;
  bottom: 48px;
  right: 12px;
  min-width: 230px;

  /* Modern "floating card" look */
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.96);          /* almost-black slate */
  color: #f9fafb;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
  font: 13px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  z-index: 20;

  /* Subtle open / close animation */
  opacity: 0;
  transform: translateY(6px) scale(.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition:
    opacity .16s ease-out,
    transform .16s ease-out;
}

/* Toggle visibility with this class (keep your JS the same) */
.cc-settings-panel.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cc-settings-row {
  margin-bottom: 10px;
}

.cc-settings-row:last-child {
  margin-bottom: 0;
}

.cc-settings-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8; /* muted label color */
}

/* Modern selects */
.cc-settings-panel select {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 8px;
  border: 1px solid rgba(30, 64, 175, 0.55);
  outline: none;
  cursor: pointer;
  transition:
    border-color .12s ease,
    box-shadow .12s ease,
    background-color .12s ease;
}

.cc-settings-panel select:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(59, 130, 246, 0.7);
}

.cc-settings-panel select:focus-visible {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.9);
}




/* === MODERN SEARCH BAR === */

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
    flex-wrap: wrap;
}

/* Wrapper for input + icon */
.search-input-wrapper {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
}

/* The magnifying glass */
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #9ca3af; /* gray-400 */
    pointer-events: none;
}

/* Text input */
.search-input {
    width: 100%;
    padding: 8px 10px 8px 46px;  /* space for icon on left */
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
    background-color: #ffffff;
}

/* Type dropdown on the right */
.search-type-select {
    font-size: 18px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    padding: 7px 10px;
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    outline: none;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.search-type-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Search button */
.search-button {
    font-size: 18px;
    border-radius: 999px;
    border: 1px solid #1d4ed8;
    padding: 7px 16px;
    background-color: #2563eb;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.search-button:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 3px 5px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}


/* Hide search icon on small screens (iPhone fix) */
@media (max-width: 640px) {
    .search-icon {
        display: none !important;
    }

    /* Remove the extra padding reserved for the icon */
    .search-input {
        padding-left: 12px !important;
    }

    /* Optional: make the input a bit tighter */
    .search-input-wrapper {
        display: block;
    }
}



/* Comment */
.comment-body {
  width: 100%;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  box-sizing: border-box;
  resize: none;
}

.comment-submit {
  padding: 3px 16px;
  /*height: 36px;*/
  font-size: 16px;
  line-height: 36px;
  border-radius: 999px;
  border: 1px solid #1d4ed8;
  background-color: #2563eb; 
  color: #ffffff; 
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

/* 404 Not found error page */
.error-container {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    background-color: #D3D3D3;
    justify-content: center;
    align-items: center;
}

.error-container h1 {
    font-size: 5rem;
    color: #ff5733;
}

.error-container p {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.error-container a {
    text-decoration: none;
    background-color: #ff5733;
    color: #fff;
    padding: 10px 20px;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.error-container a:hover {
    background-color: #e6482e;
}


/* Load more button for auto load of videos on index page */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px;
}

.load-more-button {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: #0f172a;
    color: #e5e7eb;
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
}

.load-more-button:hover:not(:disabled) {
    background: #1e293b;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.8);
    transform: translateY(-1px);
}

.load-more-button:disabled {
    cursor: default;
    opacity: 0.6;
}

/* Dropdown container */
.nav-dropdown {
    position: relative;
    display: inline-block;
    width: max-content;
}

/* Admin menu toggle */
.nav-dropdown-toggle {
    cursor: pointer;
    padding: 10px;
}

/* Hidden submenu */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    background: #800000;;
    /*border: 1px solid #ddd;*/
    min-width: 180px;

    z-index: 1000;
    border-radius: 18px;
}

/* Submenu items */
.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background-color: #591002;
}

/* Show on hover (desktop) */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

/* Mobile support: make dropdown open on click */
@media (max-width: 768px) {
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none; /* disable hover */
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
}

/* Flash message container */
.flash-message {
    padding: 10px 14px;
    margin: 10px 0 15px 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
}

/* Success (green) */
.flash-success {
    background-color: #e6f4ea;   /* light green */
    color: #1e7b34;              /* dark green text */
    border-left-color: #1e7b34;  /* green accent bar */
}

/* Error (red) */
.flash-error {
    background-color: #fdecea;   /* light red */
    color: #b10000;              /* bold dark red */
    border-left-color: #b10000;  /* red accent bar */
}

/* Optional: subtle fade-in */
.flash-message {
    animation: flashFadeIn 0.25s ease-out;
}

@keyframes flashFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash-message {
    max-width: 900px;
}

.btn-small {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #888;
    background-color: #f5f5f5;
    cursor: pointer;
}

.btn-small:hover {
    background-color: #e0e0e0;
}

.is-readonly {
  background: #f1f5f9;
  color: rgb(109, 109, 109);
  border: 0px;
}


/* =========================================================
   Annotation Overlay (Manthan)
   ========================================================= */

.annotation-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.55); /* slate/black */
  backdrop-filter: blur(6px);
}

.annotation-overlay[hidden] {
  display: none !important;
}

.annotation-card {
  width: min(920px, 96vw);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

/* When we show overlay, we’ll add .is-open via JS */
.annotation-overlay.is-open .annotation-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.annotation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.95);
}

.annotation-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.annotation-close {
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.annotation-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.annotation-body {
  padding: 16px;
  font-size: 16px;
  line-height: 1.55;
  color: #111827;
}

.annotation-body p {
  margin: 0 0 10px 0;
}

.annotation-body .annotation-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.annotation-body .annotation-question {
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(2, 132, 199, 0.07);
  border: 1px solid rgba(2, 132, 199, 0.20);
}

.annotation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.95);
  flex-wrap: wrap;
}

.annotation-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #ffffff;
  color: #0f172a;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.annotation-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.annotation-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.annotation-toggle {
  font-size: 13px;
  color: #334155;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  user-select: none;
}

.annotation-toggle input {
  width: 16px;
  height: 16px;
}

/* Mini-video placeholder (we’ll use in Step 3) */
.annotation-mini-video {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(360px, 46vw);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  display: none; /* shown only when we move the video into it */
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .annotation-mini-video {
    width: 86vw;
    right: 10px;
    bottom: 10px;
  }
  .annotation-body {
    font-size: 15px;
  }
}

.player-shell .plyr { position: relative; }

.cc-settings-container {
  position: absolute;
  right: 14px;
  bottom: 62px;
  z-index: 9999;
}

.browse-search-box {
    max-width: 800px;
    margin-bottom: 28px;
}

.browse-search-input {
    width: 100%;
    max-width: 700px;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.browse-search-input:focus {
    outline: none;
    border-color: #555;
}

.browse-search-hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 6px;
    margin-bottom: 10px;
}

.browse-search-results {
    margin-top: 8px;
}

.browse-result-list {
    list-style: none;
    padding-left: 0;
    margin-top: 8px;
}

.browse-result-list li {
    margin-bottom: 8px;
}

.browse-result-list a {
    display: block;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    background: #fafafa;
}

.browse-result-list a:hover {
    background: #f0f0f0;
}

.browse-search-status {
    color: #666;
    font-size: 0.95rem;
}
