/* ============================================
   EMBED TOGGLE BUTTON
   ============================================ */
.watch-embed-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 0px solid var(--accent-color);
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.watch-embed-toggle-btn:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.watch-embed-toggle-btn.active {
    background: var(--accent-color);
    color: var(--primary-dark);
}

.watch-embed-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 215, 0, 0.05);
}

.watch-embed-toggle-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 215, 0, 0.05);
}

.watch-embed-toggle-btn i {
    font-size: 0.875rem;
}

/* ============================================
   EMBED CODE MODAL/POPUP
   ============================================ */
.embed-code-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999999 !important;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
    isolation: isolate;
    margin: 0 !important;
    box-sizing: border-box !important;
}

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

.embed-code-section {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.98), rgba(15, 15, 20, 0.98));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 0;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 215, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.embed-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.embed-code-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.embed-code-header h3 i {
    color: var(--accent-color);
}

.embed-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    z-index: 10;
}

.embed-modal-close:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
    transform: rotate(90deg);
    border-color: var(--accent-color);
}

.embed-copy-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.embed-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.embed-copy-btn.copied {
    background: #10b981;
}

.embed-code-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    margin: 0;
}

.embed-code-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.embed-size-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.embed-size-option {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.embed-size-option:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.embed-size-option.active {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.embed-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Mobile embed layout lives in redesign.css (bottom sheet + 2×2 size cards) */

/* Embed Tabs */
.embed-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.embed-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.embed-tab:hover {
    color: var(--accent-color);
    background: rgba(255, 215, 0, 0.05);
}

.embed-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
}

.embed-tab i {
    font-size: 0.875rem;
}

/* Embed Tab Content */
.embed-tab-content {
    display: none;
}

.embed-tab-content.active {
    display: block;
}

/* ============================================
   ERROR PAGE STYLES
   ============================================ */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 3rem 1.5rem;
    text-align: center;
}

.error-icon {
    font-size: 6rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: fadeInScale 0.5s ease-out;
}

.error-icon i {
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.error-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.error-actions .btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.error-actions .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.error-actions .btn-secondary {
    background: var(--primary-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.error-actions .btn-secondary:hover {
    background: var(--primary);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error Page Responsive */
@media (max-width: 768px) {
    .error-page {
        padding: 2rem 1rem;
        min-height: 50vh;
    }

    .error-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .error-page h1 {
        font-size: 1.5rem;
    }

    .error-page p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .error-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
