/**
 * Character Tracker - Public Styles
 * Brand: Cozy Crime Index
 * Colors: Teal (#0A9396) + Golden (#F9B702) + Cream (#FFF8F0)
 */

/* ==========================================================================
   Search Results Styling
   ========================================================================== */

/* Ensure excerpts are visible in search results for TV shows */
.search-results .post-ct_show .entry-post,
.search-results .post-ct_show .entry-content,
.search-results article.ct_show .entry-post,
.search-results article.ct_show .entry-content {
    margin-top: 10px;
    margin-bottom: 15px;
}

.search-results .post-ct_show .entry-post p,
.search-results .post-ct_show .entry-content p,
.search-results article.ct_show .entry-post p,
.search-results article.ct_show .entry-content p {
    color: var(--medium-grey);
    line-height: 1.6;
    font-size: 0.95rem;
}

.search-results .post-ct_show .title-post,
.search-results article.ct_show .title-post {
    margin-bottom: 8px;
}

.search-results .post-ct_show .title-post a,
.search-results article.ct_show .title-post a {
    color: var(--teal);
    text-decoration: none;
}

.search-results .post-ct_show .title-post a:hover,
.search-results article.ct_show .title-post a:hover {
    color: var(--teal-deep);
    text-decoration: underline;
}

/* Hide theme's default title on TV show pages */
.single-ct_show .entry-title,
.single-ct_show .page-title,
.single-ct_show article > h1:first-child,
.single-ct_show .post-title {
    display: none !important;
}

/* Hide sidebar on taxonomy archive pages */
.ct-taxonomy-archive #secondary,
.ct-taxonomy-archive .widget-area,
.tax-ct_genre #secondary,
.tax-ct_genre .widget-area,
.tax-ct_network #secondary,
.tax-ct_network .widget-area,
.tax-ct_vibe #secondary,
.tax-ct_vibe .widget-area,
.tax-ct_time_period #secondary,
.tax-ct_time_period .widget-area {
    display: none !important;
}

/* Full width content on taxonomy archive pages */
.ct-taxonomy-archive .content-area,
.tax-ct_genre .content-area,
.tax-ct_network .content-area,
.tax-ct_vibe .content-area,
.tax-ct_time_period .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

.ct-taxonomy-archive .site-main,
.tax-ct_genre .site-main,
.tax-ct_network .site-main,
.tax-ct_vibe .site-main,
.tax-ct_time_period .site-main {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* CSS Variables - Brand Colors */
:root {
    /* Primary Colors */
    --teal: #0A9396;
    --teal-deep: #076668;
    --teal-light: #5EC9CC;
    --golden: #F9B702;
    --golden-dark: #E0A502;
    
    /* Neutrals */
    --cream: #FFF8F0;
    --charcoal: #2B2B2B;
    --soft-grey: #D4C5B9;
    --medium-grey: #696969;
    --white: #FFFFFF;
    
    /* Accent */
    --warm-orange: #E76F51;
    
    /* Shadows */
    --shadow-teal: 0 2px 8px rgba(10, 147, 150, 0.25);
    --shadow-golden: 0 2px 8px rgba(249, 183, 2, 0.25);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(10, 147, 150, 0.15);
}

/* ==========================================================================
   Show Info Display
   ========================================================================== */

.ct-show-info {
    max-width: 1200px;
    margin: 0 auto 40px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.ct-show-header {
    padding: 40px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: var(--white);
    overflow: auto;
}

/* Default: No poster, full width */
.ct-show-header .ct-show-details {
    width: 100%;
    max-width: none;
}

/* When poster exists - use float layout */
.ct-show-header .ct-show-poster {
    float: left;
    width: 250px;
    margin-right: 40px;
    margin-bottom: 20px;
}

/* If poster exists, details wraps around it */
.ct-show-header:has(.ct-show-poster) .ct-show-details {
    margin-left: 0;
}

.ct-show-poster img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    display: block;
}

.ct-show-title {
    font-size: 2.5rem !important;
    margin: 0 0 20px 0 !important;
    color: var(--white) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    font-family: Georgia, serif !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

.ct-show-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.ct-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.ct-meta-item .dashicons {
    font-size: 18px;
}

.ct-rating {
    background: rgba(249, 183, 2, 0.3);
}

.ct-stars {
    font-size: 1rem;
    line-height: 1;
}

.ct-rating-number {
    font-weight: 600;
    margin-left: 5px;
}

.ct-location {
    background: rgba(255,255,255,0.25);
}

.ct-location .dashicons-location {
    color: var(--golden);
}

.ct-status-completed {
    background: rgba(76,175,80,0.3);
}

.ct-status-ongoing {
    background: rgba(33,150,243,0.3);
}

.ct-status-cancelled {
    background: rgba(244,67,54,0.3);
}

.ct-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ct-genre-tag {
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.ct-networks {
    margin-bottom: 15px;
    font-size: 1rem;
}

.ct-label {
    opacity: 0.9;
    margin-right: 8px;
}

.ct-network-tag {
    font-weight: 600;
}

.ct-vibes {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.ct-vibe-tag {
    background: rgba(249, 183, 2, 0.25);
    padding: 6px 16px;
    border-radius: 16px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.ct-time-period {
    margin-bottom: 15px;
    font-size: 1rem;
}

.ct-period-tag {
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.ct-episode-count {
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0.95;
}

.ct-show-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ct-link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--teal) !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-teal);
}

.ct-link-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--cream);
}

.ct-link-button .dashicons {
    font-size: 20px;
}

.ct-imdb-link {
    background: var(--golden);
    color: var(--charcoal) !important;
}

.ct-imdb-link:hover {
    background: var(--golden-dark);
}

.ct-show-description {
    padding: 40px;
    background: var(--cream);
}

.ct-show-description h2 {
    margin-top: 0;
    color: var(--teal);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: Georgia, serif;
}

.ct-show-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin: 0;
}

/* Fluent Community Button Section */
.ct-community-section {
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(10, 147, 150, 0.1) 0%, rgba(10, 147, 150, 0.05) 100%);
    border-top: 2px solid var(--teal-light);
    border-bottom: 2px solid var(--teal-light);
    text-align: center;
}

.ct-community-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: #FFFFFF !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-teal);
    min-width: 280px;
}

.ct-community-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 100%);
    color: #FFFFFF !important;
    text-decoration: none;
}

.ct-community-button .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.ct-community-button,
.ct-community-button span,
.ct-community-button .dashicons {
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.ct-community-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 4px;
}

/* YouTube Trailer Section */
.ct-show-trailer {
    padding: 40px;
    background: var(--white);
    border-top: 2px solid var(--soft-grey);
}

.ct-show-trailer h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--teal);
    font-size: 1.8rem;
    font-family: Georgia, serif;
}

.ct-trailer-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 20px;
    padding-bottom: 56.25%; /* 16:9 aspect ratio = 9/16 = 0.5625 = 56.25% */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-teal);
    background: transparent;
    line-height: 0;
    font-size: 0;
    margin-bottom: 20px;
    /* Modern aspect-ratio support - cleaner approach */
    aspect-ratio: 16 / 9;
}

/* If aspect-ratio is supported, use it instead of padding-bottom trick */
@supports (aspect-ratio: 16 / 9) {
    .ct-trailer-container {
        padding-bottom: 0;
        height: auto;
    }
}

.ct-trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.ct-trailer-link {
    text-align: center;
    margin-top: 20px;
}

.ct-trailer-link .ct-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--teal);
    color: #FFFFFF !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-teal);
    text-align: center;
}

.ct-trailer-link .ct-link-button,
.ct-trailer-link .ct-link-button span,
.ct-trailer-link .ct-link-button .dashicons {
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.ct-trailer-link .ct-link-button:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: #FFFFFF !important;
    text-decoration: none;
}

.ct-trailer-link .ct-link-button:hover,
.ct-trailer-link .ct-link-button:hover span,
.ct-trailer-link .ct-link-button:hover .dashicons {
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.ct-trailer-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.ct-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 40px 0;
}

.ct-tracker-section {
    margin-top: 40px;
}

.ct-tracker-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--teal);
    text-align: center;
    font-family: Georgia, serif;
}

.ct-subtitle {
    text-align: center;
    color: var(--medium-grey);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* ==========================================================================
   Character Tracker Container
   ========================================================================== */

.ct-character-tracker {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.ct-header {
    text-align: center;
    margin-bottom: 40px;
}

.ct-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.ct-tagline {
    color: #666;
    font-size: 1.1rem;
}

/* Show Info Buttons */
.ct-info-button-wrapper {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ct-show-info-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--golden);
    color: var(--charcoal);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
    white-space: nowrap;
}

.ct-show-info-btn:hover {
    background: var(--golden-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.4);
    color: var(--charcoal);
    text-decoration: none;
}

.ct-similar-shows-btn {
    background: var(--teal);
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(10, 147, 150, 0.3);
}

.ct-similar-shows-btn:hover {
    background: var(--teal-deep);
    box-shadow: 0 4px 8px rgba(10, 147, 150, 0.4);
    color: #FFFFFF;
}

/* ==========================================================================
   Episode Progress Section
   ========================================================================== */

.ct-progress-section {
    background: var(--cream);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--soft-grey);
}

.ct-progress-section label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--charcoal);
    font-weight: 500;
}

.ct-slider-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.ct-episode-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--soft-grey);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.ct-episode-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--teal);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-teal);
}

.ct-episode-slider::-webkit-slider-thumb:hover {
    background: var(--teal-deep);
    transform: scale(1.2);
}

.ct-episode-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--teal);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-teal);
}

.ct-episode-display {
    text-align: center;
    font-size: 1.2rem;
    color: var(--teal);
    font-weight: 600;
}

/* Season Selector (for longer shows) */
.ct-season-selector-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.ct-selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ct-selector-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.ct-season-select,
.ct-episode-select {
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--soft-grey);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 150px;
    color: var(--charcoal);
}

.ct-season-select:hover,
.ct-episode-select:hover,
.ct-season-select:focus,
.ct-episode-select:focus {
    outline: none;
    border-color: var(--teal);
}

.ct-progress-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 20px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--medium-grey);
}

.ct-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-progress-label {
    font-weight: 600;
    opacity: 0.75;
}

.ct-overall-episode {
    color: var(--teal);
    font-size: 1.3rem;
    font-weight: 700;
}

/* ==========================================================================
   Filters Section (Search + Toggle)
   ========================================================================== */

.ct-filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.ct-filter-left {
    flex: 1;
}

.ct-filter-right {
    flex-shrink: 0;
}

.ct-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--soft-grey);
    border-radius: 8px;
    transition: border-color 0.3s;
    background: var(--white);
    color: var(--charcoal);
}

.ct-search-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.1);
}

.ct-toggle-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    background: var(--cream);
    border: 2px solid var(--soft-grey);
    border-radius: 8px;
    transition: all 0.3s;
    user-select: none;
}

.ct-toggle-filter:hover {
    background: var(--white);
    border-color: var(--teal);
}

.ct-toggle-filter input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.ct-toggle-text {
    font-weight: 500;
    color: var(--charcoal);
}

.ct-toggle-badge {
    background: var(--teal);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    box-shadow: var(--shadow-teal);
}

.ct-show-new-only:checked ~ .ct-toggle-badge {
    background: var(--golden);
    color: var(--charcoal);
    animation: pulse 0.5s;
}

/* ==========================================================================
   Characters Grid
   ========================================================================== */

.ct-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Column variations */
.ct-columns-2 { grid-template-columns: repeat(2, 1fr); }
.ct-columns-3 { grid-template-columns: repeat(3, 1fr); }
.ct-columns-4 { grid-template-columns: repeat(4, 1fr); }
.ct-columns-5 { grid-template-columns: repeat(5, 1fr); }
.ct-columns-6 { grid-template-columns: repeat(6, 1fr); }

/* Character Card - Default Style */
.ct-character-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--soft-grey);
}

.ct-character-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ct-character-image {
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: #f0f0f0;
}

.ct-character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-character-info {
    padding: 15px;
}

.ct-character-name {
    font-size: 1.125rem;
    margin: 0 0 5px 0;
    color: var(--teal);
    font-weight: 600;
}

.ct-actor-name {
    font-size: 0.875rem;
    color: var(--medium-grey);
    margin: 0 0 10px 0;
}

.ct-character-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ct-episode-badge {
    display: inline-block;
    background: rgba(94, 201, 204, 0.2);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(10, 147, 150, 0.3);
}

.ct-new-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--golden) 0%, #FFD60A 100%);
    color: var(--charcoal);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-golden);
    animation: fadeInScale 0.5s ease-out;
}

.ct-is-new {
    animation: highlightNew 0.6s ease-out;
}

.ct-is-new .ct-character-card {
    border: 2px solid var(--golden);
}

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

@keyframes highlightNew {
    0%, 100% {
        box-shadow: var(--shadow-soft);
    }
    50% {
        box-shadow: 0 4px 20px rgba(249, 183, 2, 0.4);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Card Style: Minimal */
.ct-style-minimal .ct-character-card {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.ct-style-minimal .ct-character-card:hover {
    transform: none;
    border-color: #4CAF50;
}

/* Card Style: Modern */
.ct-style-modern .ct-character-card {
    border-radius: 20px;
}

.ct-style-modern .ct-character-image {
    height: 300px;
}

/* ==========================================================================
   Loading & Error States
   ========================================================================== */

.ct-loading,
.ct-error,
.ct-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.ct-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--soft-grey);
    border-top: 4px solid var(--teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ct-error {
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
}

/* ==========================================================================
   Locked Message
   ========================================================================== */

.ct-locked-message {
    background: rgba(249, 183, 2, 0.1);
    border-left: 4px solid var(--golden);
    padding: 15px 20px;
    border-radius: 4px;
    text-align: center;
}

.ct-locked-message p {
    margin: 0;
    color: var(--charcoal);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.ct-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.ct-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.ct-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.ct-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.ct-modal-content {
    padding: 20px;
}

.ct-modal-content img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ct-modal-content h2 {
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.ct-modal-content .ct-actor {
    color: #666;
    margin-bottom: 15px;
}

.ct-modal-content .ct-episodes {
    font-size: 0.95rem;
    color: #999;
}

/* ==========================================================================
   Notification
   ========================================================================== */

.ct-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideInRight 0.3s;
}

.ct-notification-success {
    background: var(--teal);
    color: var(--white);
}

.ct-notification-error {
    background: var(--warm-orange);
    color: var(--white);
}

/* ==========================================================================
   Message Boxes (Login Required, Access Denied)
   ========================================================================== */

.ct-login-required,
.ct-access-denied {
    padding: 40px 20px;
}

.ct-message-box {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.ct-message-box h3 {
    margin-top: 0;
    color: #1a1a1a;
}

.ct-message-box p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.ct-upgrade-message {
    border-color: var(--golden);
    background: rgba(249, 183, 2, 0.1);
}

.ct-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--teal);
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: var(--shadow-teal);
}

.ct-button:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
}

.ct-button-premium {
    background: var(--golden);
    color: var(--charcoal) !important;
    box-shadow: var(--shadow-golden);
}

.ct-button-premium:hover {
    background: var(--golden-dark);
}

/* ==========================================================================
   Show Grid
   ========================================================================== */

.ct-show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.ct-show-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ct-show-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.ct-show-thumbnail {
    overflow: hidden;
    height: 350px;
}

.ct-show-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ct-show-card:hover .ct-show-thumbnail img {
    transform: scale(1.05);
}

.ct-show-content {
    padding: 20px;
}

.ct-show-title {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.ct-show-title a {
    color: var(--charcoal);
    text-decoration: none;
}

.ct-show-title a:hover {
    color: var(--teal);
}

.ct-show-excerpt {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.ct-show-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ct-show-meta span {
    background: #e0e0e0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Show Search
   ========================================================================== */

.ct-show-search {
    margin: 20px 0;
    position: relative;
}

.ct-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.ct-search-wrapper {
    display: flex;
    gap: 10px;
}

.ct-layout-stacked .ct-search-wrapper {
    flex-direction: column;
}

.ct-search-field {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--soft-grey);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--white);
    color: var(--charcoal);
}

.ct-search-field:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.1);
}

.ct-search-submit {
    padding: 12px 30px;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: var(--shadow-teal);
}

.ct-search-submit:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
}

.ct-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}

.ct-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ct-results-list li {
    border-bottom: 1px solid #f0f0f0;
}

.ct-results-list li:last-child {
    border-bottom: none;
}

.ct-results-list a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.ct-results-list a:hover {
    background: #f8f9fa;
}

.ct-results-list img {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

/* ==========================================================================
   Related Content Section
   ========================================================================== */

.ct-related-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ct-section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--charcoal);
    text-align: center;
    border-bottom: 3px solid var(--golden);
    padding-bottom: 15px;
}

.ct-credits-section {
    margin-bottom: 40px;
}

.ct-related-section {
    margin-bottom: 40px;
}

.ct-credits-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.ct-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ct-credit-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--cream);
    border-radius: 12px;
    border-left: 4px solid var(--teal);
}

.ct-credit-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.ct-credit-value {
    font-size: 1.1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.ct-related-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Books List */
.ct-books-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ct-book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.ct-book-item:hover {
    background: var(--white);
    border-color: var(--teal);
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.ct-book-item.ct-no-link {
    cursor: default;
}

.ct-book-item.ct-no-link:hover {
    transform: none;
    border-color: transparent;
}

.ct-book-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ct-book-title {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.ct-external-icon {
    color: var(--teal);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Related Shows List */
.ct-related-shows-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.ct-related-show-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.ct-related-show-item:hover {
    background: var(--white);
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ct-related-show-item.ct-no-link {
    opacity: 0.7;
    cursor: default;
}

.ct-related-show-item.ct-no-link:hover {
    transform: none;
    border-color: transparent;
}

.ct-show-icon {
    font-size: 1.3rem;
}

.ct-show-title {
    font-weight: 500;
    color: #333;
}

/* Auto-Generated Related Shows */
.ct-auto-related-shows {
    padding: 40px;
    background: var(--cream);
    border-radius: 16px;
    margin: 40px auto;
    max-width: 1200px;
}

.ct-auto-related-shows .ct-section-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--teal);
    font-size: 2rem;
    font-family: Georgia, serif;
}

.ct-section-subtitle {
    color: var(--medium-grey);
    font-size: 1rem;
    margin-bottom: 30px;
    font-style: italic;
}

.ct-related-shows-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ct-related-show-header {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(10, 147, 150, 0.1);
}

.ct-related-show-header:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--teal-light);
}

.ct-related-show-header:not(:last-child) {
    margin-bottom: 30px;
    padding-bottom: 0;
    border-bottom: none;
}

.ct-related-show-link {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    padding: 25px 30px;
    text-decoration: none;
    color: inherit;
}

.ct-related-show-poster {
    width: 180px;
    height: 270px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--charcoal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.ct-related-show-header:hover .ct-related-show-poster {
    transform: scale(1.02);
}

.ct-related-show-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct-related-show-poster.ct-no-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--soft-grey) 0%, var(--medium-grey) 100%);
}

.ct-related-show-poster.ct-no-poster .dashicons {
    font-size: 70px;
    color: rgba(255, 255, 255, 0.3);
}

.ct-related-show-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 5px;
}

.ct-related-show-title {
    margin: 0 0 8px 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--teal);
    font-family: Georgia, serif;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.ct-related-show-header:hover .ct-related-show-title {
    color: var(--teal-deep);
}

.ct-related-show-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.ct-related-show-meta-bar .ct-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--cream);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--charcoal);
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(10, 147, 150, 0.08);
}

.ct-related-show-meta-bar .ct-meta-item .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    color: var(--teal);
    flex-shrink: 0;
}

.ct-related-show-meta-bar .ct-rating {
    background: linear-gradient(135deg, #fff8e1 0%, var(--cream) 100%);
    border-color: rgba(249, 183, 2, 0.2);
}

.ct-related-show-meta-bar .ct-rating .ct-stars {
    font-size: 1.05rem;
    line-height: 1;
}

.ct-related-show-meta-bar .ct-rating .ct-rating-number {
    font-weight: 600;
    color: var(--charcoal);
}

.ct-related-show-meta-bar .ct-status {
    font-weight: 600;
    padding: 7px 16px;
}

.ct-related-show-meta-bar .ct-status-ongoing {
    background: rgba(10, 147, 150, 0.1);
    color: var(--teal-deep);
    border-color: rgba(10, 147, 150, 0.2);
}

.ct-related-show-meta-bar .ct-status-completed {
    background: rgba(212, 197, 185, 0.3);
    color: var(--charcoal);
    border-color: rgba(212, 197, 185, 0.4);
}

.ct-related-show-meta-bar .ct-status-cancelled {
    background: rgba(238, 68, 81, 0.1);
    color: #c33;
    border-color: rgba(238, 68, 81, 0.2);
}

.ct-related-show-details .ct-genres {
    margin-top: 5px;
}

.ct-related-show-details .ct-networks {
    margin-top: 0;
}

.ct-related-show-details .ct-episode-count {
    margin-top: 2px;
    font-size: 0.95rem;
    color: var(--medium-grey);
    font-weight: 500;
}

.ct-related-show-details .ct-episode-count strong {
    color: var(--teal);
    font-weight: 600;
}

/* External Links */
.ct-external-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ct-external-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.ct-external-link:hover {
    background: var(--white);
    border-color: var(--teal);
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.ct-external-link .dashicons {
    color: var(--teal);
    font-size: 20px;
}

/* ==========================================================================
   Character Notes
   ========================================================================== */

.ct-note-area {
    border-top: 2px solid var(--soft-grey);
    padding: 15px;
    background: var(--cream);
}

.ct-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ct-note-label {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
}

.ct-note-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--medium-grey);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.ct-note-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--charcoal);
}

.ct-note-input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--soft-grey);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s;
}

.ct-note-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.1);
}

.ct-note-status {
    margin-top: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.ct-note-status .saving {
    color: var(--medium-grey);
    font-style: italic;
}

.ct-note-status .saved {
    color: var(--teal);
    font-weight: 600;
}

.ct-note-status .error {
    color: var(--warm-orange);
    font-weight: 600;
}

.ct-add-note-btn {
    display: block;
    margin: 10px auto 0;
    padding: 4px 10px;
    background: var(--golden);
    color: var(--charcoal);
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ct-add-note-btn:hover {
    background: var(--golden-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Character Occupation (Admin-editable, visible to all)
   ========================================================================== */

.ct-character-occupation {
    color: var(--teal);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 4px 0 8px 0;
    font-style: italic;
}

.ct-character-occupation:empty {
    display: none;
}

.ct-occupation-area {
    border-top: 2px solid var(--teal-light);
    padding: 15px;
    background: linear-gradient(to bottom, rgba(10, 147, 150, 0.05), transparent);
}

.ct-occupation-header {
    margin-bottom: 10px;
}

.ct-occupation-label {
    font-weight: 600;
    color: var(--teal-deep);
    font-size: 0.9rem;
}

.ct-occupation-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--teal-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.ct-occupation-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.15);
}

.ct-occupation-status {
    margin-top: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.ct-occupation-status .saving {
    color: var(--medium-grey);
    font-style: italic;
}

.ct-occupation-status .saved {
    color: var(--teal);
    font-weight: 600;
}

.ct-occupation-status .error {
    color: var(--warm-orange);
    font-weight: 600;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .ct-show-header {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 20px;
    }
    
    .ct-show-poster {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .ct-show-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .ct-show-meta-bar {
        justify-content: center;
        font-size: 0.95rem;
    }
    
    .ct-meta-item {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .ct-genres {
        justify-content: center;
    }
    
    .ct-networks {
        text-align: center;
    }
    
    .ct-show-links {
        justify-content: center;
    }
    
    .ct-show-description {
        padding: 30px 20px;
    }
    
    .ct-show-description h2 {
        font-size: 1.5rem;
    }
    
    .ct-show-description p {
        font-size: 1rem;
    }
    
    .ct-community-section {
        padding: 25px 20px;
    }
    
    .ct-community-button {
        min-width: auto;
        width: 100%;
        max-width: 400px;
        padding: 18px 30px;
        font-size: 1rem;
    }
    
    .ct-community-button .dashicons {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .ct-show-trailer {
        padding: 30px 20px;
    }
    
    .ct-show-trailer h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .ct-trailer-container {
        max-width: 100%;
    }
    
    .ct-trailer-link .ct-link-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .ct-auto-related-shows {
        padding: 30px 20px;
        margin: 30px auto;
    }
    
    .ct-auto-related-shows .ct-section-title {
        font-size: 1.6rem;
    }
    
    .ct-related-show-link {
        grid-template-columns: 140px 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .ct-related-show-poster {
        width: 140px;
        height: 210px;
    }
    
    .ct-related-show-title {
        font-size: 1.6rem;
    }
    
    .ct-related-show-meta-bar {
        gap: 8px;
    }
    
    .ct-related-show-meta-bar .ct-meta-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .ct-related-show-details {
        gap: 15px;
    }
    
    .ct-filters-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .ct-filter-left,
    .ct-filter-right {
        width: 100%;
    }
    
    .ct-toggle-filter {
        justify-content: center;
    }
    
    .ct-characters-grid,
    .ct-show-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .ct-header h2 {
        font-size: 2rem;
    }
    
    .ct-progress-section {
        padding: 20px;
    }
    
    .ct-season-selector-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .ct-selector-group {
        width: 100%;
    }
    
    .ct-season-select,
    .ct-episode-select {
        width: 100%;
        min-width: auto;
    }
    
    .ct-progress-display {
        justify-content: center;
        width: 100%;
    }
    
    .ct-related-content {
        padding: 30px 20px;
    }
    
    .ct-credits-grid {
        grid-template-columns: 1fr;
    }
    
    .ct-related-shows-list {
        grid-template-columns: 1fr;
    }
    
    .ct-modal {
        width: 95%;
    }
    
    .ct-columns-2,
    .ct-columns-3,
    .ct-columns-4,
    .ct-columns-5,
    .ct-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ct-community-section {
        padding: 20px 15px;
    }
    
    .ct-community-button {
        padding: 16px 24px;
        font-size: 0.95rem;
        max-width: 100%;
    }
    
    .ct-community-button .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    
    .ct-community-subtitle {
        font-size: 0.8rem;
    }
    
    .ct-auto-related-shows {
        padding: 20px 15px;
    }
    
    .ct-auto-related-shows .ct-section-title {
        font-size: 1.4rem;
    }
    
    .ct-related-show-link {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
    }
    
    .ct-related-show-poster {
        width: 100%;
        max-width: 220px;
        height: auto;
        padding-bottom: 150%;
        margin: 0 auto;
        position: relative;
    }
    
    .ct-related-show-poster img {
        position: absolute;
        top: 0;
        left: 0;
    }
    
    .ct-related-show-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .ct-related-show-meta-bar {
        justify-content: center;
        gap: 6px;
    }
    
    .ct-related-show-meta-bar .ct-meta-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .ct-related-show-details {
        gap: 12px;
    }
    
    .ct-related-show-details > div {
        text-align: center;
    }
    
    .ct-genres,
    .ct-networks {
        justify-content: center;
    }
    
    .ct-characters-grid,
    .ct-show-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ct-character-image {
        height: 220px;
    }
}
