:root {
    --red: #FF0000;
    --green: #0af15c;
    --bg: #3a4046;
    --text: #eee;
    --card-bg: #111;
    --input-bg: #FFF;
    --auto-bg: #0b0f14;
    --auto-card: #121923;
    --auto-muted: #9bb0c3;
    --auto-text: #e7f0f7;
    --auto-accent: #64b0ff;
    --auto-ok: #8af5b5;
}

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

.lang-switcher {
    position: absolute;
    top: 20px;
    right: 100px;
    left: auto;
    z-index: 99999;
}

.lang-current {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.lang-current .arrow {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-current .arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 160px;
    max-height: 400px;
}

.lang-dropdown::-webkit-scrollbar {
    width: 8px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.lang-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option.active {
    background: rgba(255, 0, 0, 0.2);
    color: var(--red, #FF0000);
}

.lang-name {
    font-weight: 500;
}

.flag {
    width: 40px;
    height: 30px;
    display: block;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0;
}

.flag-gb {
    background: linear-gradient(to bottom,
        #012169 0%, #012169 100%);
}

.flag-gb::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 40%, white 40%, white 60%, transparent 60%),
        linear-gradient(to right, transparent 40%, white 40%, white 60%, transparent 60%),
        linear-gradient(45deg, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, white 48%, white 52%, transparent 52%);
}

.flag-gb::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 43%, #C8102E 43%, #C8102E 57%, transparent 57%),
        linear-gradient(to right, transparent 43%, #C8102E 43%, #C8102E 57%, transparent 57%),
        linear-gradient(45deg, transparent 49%, #C8102E 49%, #C8102E 51%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, #C8102E 49%, #C8102E 51%, transparent 51%);
}

.flag-de {
    background: linear-gradient(to bottom,
        #000000 0%, #000000 33.33%,
        #DD0000 33.33%, #DD0000 66.66%,
        #FFCE00 66.66%, #FFCE00 100%);
}

.flag-es {
    background: linear-gradient(to bottom,
        #AA151B 0%, #AA151B 25%,
        #F1BF00 25%, #F1BF00 75%,
        #AA151B 75%, #AA151B 100%);
}

.flag-fr {
    background: linear-gradient(to right,
        #002395 0%, #002395 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #ED2939 66.66%, #ED2939 100%);
}

.flag-pt {
    background: linear-gradient(to right,
        #006600 0%, #006600 40%,
        #FF0000 40%, #FF0000 100%);
}

.flag-it {
    background: linear-gradient(to right,
        #009246 0%, #009246 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #CE2B37 66.66%, #CE2B37 100%);
}

.flag-nl {
    background: linear-gradient(to bottom,
        #AE1C28 0%, #AE1C28 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #21468B 66.66%, #21468B 100%);
}

.flag-ru {
    background: linear-gradient(to bottom,
        #FFFFFF 0%, #FFFFFF 33.33%,
        #0039A6 33.33%, #0039A6 66.66%,
        #D52B1E 66.66%, #D52B1E 100%);
}

.flag-ja {
    background: #FFFFFF;
    position: relative;
}
.flag-ja::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #BC002D;
    border-radius: 50%;
}

.flag-ko {
    background: #FFFFFF;
}

.flag-zh {
    background: #DE2910;
}

.flag-ar {
    background: #006C35;
}

.flag-hi {
    background: linear-gradient(to bottom,
        #FF9933 0%, #FF9933 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #138808 66.66%, #138808 100%);
}

.flag-tr {
    background: #E30A17;
}

.flag-pl {
    background: linear-gradient(to bottom,
        #FFFFFF 0%, #FFFFFF 50%,
        #DC143C 50%, #DC143C 100%);
}

.flag-sv {
    background: #006AA7;
    position: relative;
}
.flag-sv::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 40%, #FECC00 40%, #FECC00 60%, transparent 60%),
        linear-gradient(to right, transparent 35%, #FECC00 35%, #FECC00 45%, transparent 45%);
}

.flag-da {
    background: #C8102E;
    position: relative;
}
.flag-da::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 40%, #FFFFFF 40%, #FFFFFF 60%, transparent 60%),
        linear-gradient(to right, transparent 35%, #FFFFFF 35%, #FFFFFF 45%, transparent 45%);
}

.flag-no {
    background: #BA0C2F;
    position: relative;
}
.flag-no::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 38%, #FFFFFF 38%, #FFFFFF 62%, transparent 62%),
        linear-gradient(to right, transparent 33%, #FFFFFF 33%, #FFFFFF 43%, transparent 43%);
}
.flag-no::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 42%, #00205B 42%, #00205B 58%, transparent 58%),
        linear-gradient(to right, transparent 36%, #00205B 36%, #00205B 40%, transparent 40%);
}

.flag-fi {
    background: #FFFFFF;
    position: relative;
}
.flag-fi::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 38%, #003580 38%, #003580 62%, transparent 62%),
        linear-gradient(to right, transparent 33%, #003580 33%, #003580 43%, transparent 43%);
}

.flag-el {
    background:
        repeating-linear-gradient(to bottom,
        #0D5EAF 0%, #0D5EAF 11.11%,
        #FFFFFF 11.11%, #FFFFFF 22.22%);
}

html, body {
    background: var(--bg);
    min-height: 100vh;
    font-family: 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
}

/* Prevent text selection on entire page */
* {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Allow text selection only in input fields */
input,
textarea {
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
}

body {
    display: flex;
    flex-direction: column;
    position: static; 
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        url("/images/pellicula.png") left top repeat-y,
        url("/images/pellicula.png") right top repeat-y;
    background-size: auto auto;
    pointer-events: none;
    z-index: 10;
}

/* Background image for O2N section */
section:has(.O2N) {
    position: relative;
    z-index: 1;
    padding-top: 30px !important;
    padding-bottom: 100px !important;
    margin-bottom: 0 !important;
}

section:has(.O2N)::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("/images/clouds.jpg") center center / cover no-repeat;
    z-index: 0;
}

/* All content inside section must be above the background */
.O2N,
.search-overlayO2N,
.ytMarkO2N,
.wrap,
.control-panel {
    position: relative;
    z-index: 2;
}

.hero-container { position: relative; width: 100%; flex-shrink: 0; }
.hero { width: 100%; text-align: center; }
.hero img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.search-overlay,
.search-overlayO2N,
.wrap {
  max-width: 680px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center;
}

.search-overlay {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 15;
}

.search-overlayO2N {
  position: relative;
  top: 0;
  margin-top: 60px;
  margin-bottom: 20px;
  z-index: 15;
}

.ytMark, .ytMarkO2N {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.ytLogo, .ytLogoO2N {
    height: 32px;
    width: auto;
    display: block;
}
.heading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
h1 {
    font-size: 26px;
    font-weight: 750;
    color: #fff;
    margin: 0;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 3px rgba(0, 0, 0, 0.5);
}
h2 {
    font-size: 26px;
    font-weight: 750;
    color: #fff;
    margin: 0;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 3px rgba(0, 0, 0, 0.5);
}

.card,
.control-panel {
  background: var(--auto-card, var(--card-bg));
  border: 1px solid #1c2936;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  position: relative;
}

.card {
    background: #000;
}

.control-panel {
    background: #000;
    gap: 14px;
    margin-top: 0px !important;
    margin-bottom: 15px !important;
}

.control-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.control-row input[type="text"],
.control-row input[type="password"] {
    flex: 1;
    min-width: 260px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #2a3a4a;
    background: #0e1621;
    color: var(--auto-text);
    outline: none;
    font-size: 14px;
}
.control-row input::placeholder { color: #6a849a; }

#idInput,
#apiKey {
    background: #fff;
    color: #000;
    border: 1px solid #444;
}
#idInput::placeholder,
#apiKey::placeholder { color: #777; }
#idInput:focus,
#apiKey:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,.2);
    border-color: #666;
}

.api-controls { align-items: center; }
.api-input {
    flex: 0 0 30% !important;
    max-width: 30% !important;
}
.api-controls .controls { flex: 1; justify-content: flex-start; }

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    appearance: none;
    border: 0;
    background: var(--red);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    min-width: 50px;
}
.btn.secondary {
    background: #1b2836;
    color: #cfe6fb;
    border: 1px solid #2b4158;
}
.btn.secondary.is-active { border: 2px solid var(--green); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

#muteBtn,
#unmuteBtn {
  background: #1b2836;
  color: white;
  border: 1px solid #2b4158;
  border-radius: 12px;
  padding: 12px 12px;
  min-width: 85px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
#muteBtn:hover,
#unmuteBtn:hover { background: #223349; }
#muteBtn:disabled,
#unmuteBtn:disabled { opacity: .6; cursor: not-allowed; }

#muteBtn.is-active,
#muteBtn[aria-pressed="true"],
#unmuteBtn.is-active,
#unmuteBtn[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,241,92,.25);
  color: white;
}

.btn-icon {
  display: inline-block;
  font-size: 20px;
  vertical-align: middle;
  margin-left: 6px;
  color: white;
}

.btn-icon-img {
    width: 24px;
    height: 24px;
    margin-left: 6px;
    vertical-align: middle;
    object-fit: contain;
    pointer-events: none;
}

#muteBtn,
#unmuteBtn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.num-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.num-group label {
    font-size: 13px;
    color: var(--auto-muted);
    white-space: nowrap;
}
.num-group input[type="number"] {
    width: 100px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #2a3a4a;
    background: #0e1621;
    color: var(--auto-text);
    font-size: 13px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auto-muted);
    white-space: nowrap;
}
.check input[type="checkbox"] { accent-color: #fff; }

.api-input {
    flex: 0 0 22% !important;
    max-width: 22% !important;
    min-width: 260px !important;
}

#allBtn {
    min-width: 60px !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
}

.btn-help {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    margin-left: 10px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-align: left;
}

.modal-body p {
    margin: 0 0 12px 0;
    font-size: 15px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body h3 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.modal-body h3:first-child {
    margin-top: 12px;
}

.modal-body ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.modal-body li {
    margin: 6px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.modal-body a {
    color: #4a9eff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.modal-body a:hover {
    color: #6eb4ff;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 16px !important;
    overflow: hidden;
    border-radius: 16px;
    background-color: transparent;
}

.player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
#player {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

#sidebar {
    width: 100%;
    height: 400px;
    min-height: 250px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    overflow: hidden;
    color: #fff;
}

#sideList {
    height: 100%;
    overflow-y: auto;
    background: #000;
    color: #fff;
}

#sidebar:empty { display: none; }

.side-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #fff;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.side-row * {
    pointer-events: none;
    cursor: pointer;
}

.side-row:hover {
    background-color: #111;
}

.side-row.active {
    background-color: #222;
}

.side-row img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    background: #000;
    flex: 0 0 auto;
}

.side-row .index,
.side-row span:first-child {
    flex: 0 0 40px;
    text-align: left;
    font-weight: 700;
    color: #fff;
    opacity: 0.9;
    margin-right: 6px;
}

.side-row div {
    font-size: 16px;
    text-align: left;
}

.side-row div > div {
    text-align: left;
}

.side-row div[style*="flex-direction:column"] {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

#playerLayout { display: none; }
#playerLayout.loaded { display: flex; margin-bottom: 20px; }
#placeholderMessage {
    text-align: center;
    padding: 40px;
    color: #6a849a;
    font-size: 14px;
}

button#go {
    position: relative;
    background: var(--red);
    color: #FFF;
    border: 1px solid rgba(0,0,0,0.2);
    border-bottom: 3px solid rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    min-width: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    isolation: isolate;
}

button#go:active {
    transform: translateY(1px);
    border-bottom: 2px solid rgba(0,0,0,0.3);
    padding-bottom: 13px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

input#handle[type="text"] {
    flex: 1;
    min-width: 300px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #444;
    background: var(--input-bg);
    color: #000;
    outline: none;
}
input#handle::placeholder { color: #777; }

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#open {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 10px 24px;
    font-size: 14px;
    background: #000;
    color: var(--green);
    border: 2px solid var(--green);
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}
#open:hover { background: var(--green); color: #000; }

.out {
    margin-top: 16px;
    padding: 12px;
    border: 1px dashed #444;
    border-radius: 10px;
    background: #222;
    display: none;
    text-align: center;
    position: relative;
    z-index: 20;
}

a.outlink {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
    word-break: break-all;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    display: inline-block;
}
a.outlink:hover { background: rgba(255, 0, 0, .2); }

section { padding-top: 10px !important; padding-bottom: 10px !important; }

.ytMark h1,
.ytMarkO2N h1 { font-size: 28px; }

#sideList { scroll-behavior: smooth; }
.side-row { scroll-margin-top: 8px; }

#startBtn {
  background: var(--red) !important;
  color: #fff !important;
  border: 1px solid rgba(0,0,0,0.2) !important;
  border-bottom: 3px solid rgba(0,0,0,0.3) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  min-width: 50px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

#startBtn:active {
  transform: translateY(1px) !important;
  border-bottom: 2px solid rgba(0,0,0,0.3) !important;
  padding-bottom: 13px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

#startBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.side-row.unavailable {
  opacity: 0.8;
}
.side-row.unavailable img {
  filter: grayscale(100%);
  opacity: 0.6;
}
.side-row.unavailable:hover {
  opacity: 1;
}

.o2n-progress-track{
  position: relative;
  width: 100%;
  height: 8px;
  background: #FFF;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
  display: none;
  z-index: 50;
}

.o2n-progress-bar{
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  display: block;
  z-index: 60;
background: linear-gradient(90deg, #ff0000);
  filter: brightness(1.3) saturate(1.3);
  transition: width .22s ease;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: #e7f0f7;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  transition: color .2s ease;
}

.video-title:hover {
  color: #ff0000;
}

.status{
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #cfe6fb;
}
.status.ok  { color: #8af5b5; }
.status.err { color: #ff4d4d; }

@keyframes o2n-shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}
.shake {
  animation: o2n-shake 0.35s ease;
  box-shadow: 0 0 0 2px rgba(255,0,0,.25);
  border-color: #ff6b6b !important;
}

#apiKey.input-error { border-color:#ff3b30; color:#ff3b30; }
#apiKey.input-error::placeholder { color:#ff3b30; }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px);  }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.shake { animation: shake 0.45s ease; }


/* ------------------------------------------------------ */
/* YOUTBINGE — DURATION FILTER */
/* ------------------------------------------------------ */

.yb-duration-filter {
  margin-top: 7px;
  padding-top: 0px;
  max-width: 900px;
}

/* LABEL 20% */
.yb-duration-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yb-duration-label-wrap {
  flex: 0 0 20%;
  max-width: 20%;
  display: flex;
  align-items: center;
}

.yb-duration-label {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  line-height: 1.2;
}

/* SLIDER 80% */
.yb-duration-slider-wrapper {
  position: relative;
  flex: 0 0 75%;
  max-width: 75%;
  padding: 28px 0 16px 0;
}

/* Track principale */
.yb-duration-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: visible;
}

.yb-duration-track-active {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--red); /* ou #ff0000 */
}

/* Jalons */
.yb-duration-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 12px;
  pointer-events: none;
}

.yb-duration-ticks span {
  position: absolute;
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  opacity: 0.9;
}

/* Labels au-dessus des triangles */
.yb-duration-label-value {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-size: 11px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

/* Triangles personnalisés */
.yb-duration-thumb {
  position: absolute;
  top: -5px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid var(--red);
  transform: translateX(-8px);
  filter: drop-shadow(0 0 4px rgba(255, 0, 68, 0.6));
  cursor: grab;
  z-index: 10;
  user-select: none;
  touch-action: none;
}

.yb-duration-thumb:active {
  cursor: grabbing;
}

/* SEO Text Styles */
.seo-text {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  margin-bottom: 0;
  opacity: 0.4;
  color: rgba(255, 255, 255, 0.3);
  display: block;
}


/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */
/* MEDIA MEDIA MEDIA MEDIA */



@media (max-width: 768px) {
    .search-overlay,
    .search-overlayO2N,
    .wrap { padding: 0 16px !important; }

    .layout { grid-template-columns: 1fr; height: auto; }
    #player { aspect-ratio: 16/9; }

    .control-row input,
    .num-group input { min-width: 100%; }

    .controls { flex-direction: column; align-items: stretch; }
    .btn, .num-group, .check { width: 100%; }

    .api-options, .number-all { flex-direction: column; align-items: stretch; }
    .api-input, .check, .num-group input {
        width: 100% !important; min-width: unset !important;
    }
}

.api-options { justify-content: space-between; gap: 12px; }
.api-input { flex: 1; min-width: 180px; max-width: 45%; }

.number-all { justify-content: flex-start; gap: 16px; }
.number-all .num-group { flex: 0 0 auto; }

.control-row.number-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px 0;
    font-size: 13px;
}
.btn.num-select.secondary {
    background-color: #38424b;
    color: #e7f0f7;
    border: 1px solid #5a6470;
    padding: 1px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 13px;
    line-height: 1.2;
    min-width: auto !important;
    width: auto !important;
    flex: 0 0 auto;
}
.btn.num-select.secondary:hover { background-color: #4b5563; }
.btn.num-select.secondary.active {
    background-color: #c00;
    border-color: #c00;
}
.control-row.number-buttons label {
     font-size: 18px;
     font-weight: 600;
     white-space: nowrap;
}

.side-row.playing {
  background: #fff !important;
  color: #000 !important;
  border-bottom: 1px solid #ddd !important;
}

.side-row.playing * {
  color: #000 !important;
}

.side-row.playing .video-title,
.side-row.playing .title {
  color: #000 !important;
}

.side-row.playing .index,
.side-row.playing span:first-child {
  color: #000 !important;
  opacity: 1 !important;
}

.side-row.playing:hover {
  background: #fff !important;
}

.unavailable-note {
  color: #ff3333 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

/* Footer Styles */
.site-footer {
  width: 100%;
  padding: 24px 20px;
  margin-top: 0;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
  z-index: 5;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
}

.footer-links a:hover {
  color: var(--red);
  text-decoration: underline;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

