/* Tinyzone Movies - Frontend Styles (Light Theme) */

/* ========== Base ========== */
.wmg-single-page,
.wmg-archive-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
    color: #222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
}

/* ========== Breadcrumb ========== */
.wmg-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wmg-breadcrumb a {
    color: #666;
    text-decoration: none;
}
.wmg-breadcrumb a:hover {
    color: #e50914;
}
.wmg-breadcrumb span:last-child {
    color: #333;
}

/* ========== Player Section ========== */
.wmg-player-section {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.wmg-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.wmg-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.wmg-backdrop-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
}
.wmg-backdrop-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wmg-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.wmg-play-overlay:hover {
    opacity: 1;
}

/* ========== Movie Info Row ========== */
.wmg-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: flex-start;
}

/* Poster Column */
.wmg-poster-col {
    flex-shrink: 0;
    width: 140px;
}
.wmg-poster-img {
    width: 100%;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.wmg-poster-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Details Column */
.wmg-details-col {
    flex: 1;
    min-width: 0;
}

/* Title */
.wmg-movie-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.3;
}

/* Badge Tags Row */
.wmg-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.wmg-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    cursor: default;
}
.wmg-badge-trailer {
    background: #333;
    color: #fff;
    cursor: pointer;
}
.wmg-badge-trailer:hover {
    background: #555;
    color: #fff;
}
.wmg-badge-quality {
    background: #e50914;
    color: #fff;
    text-transform: uppercase;
}
.wmg-badge-imdb {
    background: #f5c518;
    color: #000;
    font-weight: 700;
}
.wmg-badge-link {
    background: #eee;
    color: #333;
    cursor: pointer;
}
.wmg-badge-link:hover {
    background: #ddd;
    color: #111;
}

/* Genre Tags */
.wmg-genre-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.wmg-genre-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #444;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.2s;
}
a.wmg-genre-tag:hover {
    background: #e0e0e0;
    color: #111;
}

/* Description */
.wmg-description {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 18px;
}
.wmg-description p {
    margin: 0 0 10px;
}

/* Meta Details Table */
.wmg-meta-table {
    border-top: 1px solid #eee;
}
.wmg-meta-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    gap: 8px;
}
.wmg-meta-label {
    font-weight: 700;
    color: #111;
    min-width: 100px;
    flex-shrink: 0;
}
.wmg-meta-value {
    color: #444;
    flex: 1;
}
.wmg-meta-value a {
    color: #1a73e8;
    text-decoration: none;
}
.wmg-meta-value a:hover {
    text-decoration: underline;
}

/* Movie Type Tag */
.wmg-type-tag-wrap {
    margin-top: 14px;
}
.wmg-type-tag {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 4px;
    border: 1px solid #ddd;
    text-transform: capitalize;
}

/* ========== Related Searches Section ========== */
.wmg-searches-section {
    margin: 32px 0;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
.wmg-searches-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 14px;
}
.wmg-searches-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wmg-search-tag {
    display: inline-block;
    background: #f5f7fa;
    color: #333;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid #e0e4e8;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.wmg-search-tag:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

/* ========== FAQ Section ========== */
.wmg-faq-section {
    margin: 32px 0;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
.wmg-faq-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
}
.wmg-faq-item {
    border-bottom: 1px solid #eee;
}
.wmg-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    background: none;
    border: none;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    gap: 12px;
}
.wmg-faq-question:hover {
    color: #e50914;
}
.wmg-faq-icon {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: #888;
}
.wmg-faq-question[aria-expanded="true"] .wmg-faq-icon {
    transform: rotate(180deg);
}
.wmg-faq-answer {
    padding: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.wmg-faq-answer p {
    margin: 0;
}

/* ========== Related Movies ========== */
.wmg-related-section {
    margin: 32px 0;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
.wmg-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
}
.wmg-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.wmg-related-card {
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
}
.wmg-related-card:hover {
    transform: translateY(-4px);
}
.wmg-related-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 8px;
}
.wmg-related-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wmg-related-info {
    padding: 0 2px;
}
.wmg-related-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wmg-related-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #888;
}

/* ========== Archive Page ========== */
.wmg-archive-header {
    margin-bottom: 24px;
}
.wmg-archive-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
}
.wmg-archive-desc {
    color: #666;
    font-size: 15px;
    margin: 0;
}
.wmg-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 20px;
}
.wmg-archive-card {
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
}
.wmg-archive-card:hover {
    transform: translateY(-4px);
}
.wmg-archive-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 8px;
}
.wmg-archive-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wmg-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}
.wmg-archive-quality {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e50914;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.wmg-archive-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #f5c518;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}
.wmg-archive-info {
    padding: 0 2px;
}
.wmg-archive-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wmg-archive-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #888;
}
.wmg-pagination {
    margin-top: 32px;
    text-align: center;
}
.wmg-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wmg-pagination .page-numbers {
    padding: 8px 14px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}
.wmg-pagination .page-numbers.current,
.wmg-pagination .page-numbers:hover {
    background: #e50914;
    color: #fff;
}
.wmg-no-movies {
    text-align: center;
    color: #888;
    font-size: 16px;
    padding: 60px 0;
}

/* ========== Player Loading Spinner ========== */
.wmg-player-wrapper {
    position: relative;
}
.wmg-player-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: wmg-spin 0.8s linear infinite;
    z-index: 0;
}
.wmg-player-wrapper iframe {
    z-index: 1;
}
@keyframes wmg-spin {
    to { transform: rotate(360deg); }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .wmg-info-row {
        gap: 16px;
    }
    .wmg-poster-col {
        width: 110px;
    }
    .wmg-movie-title {
        font-size: 20px;
    }
    .wmg-archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    .wmg-related-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    .wmg-searches-grid {
        gap: 8px;
    }
    .wmg-search-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .wmg-single-page {
        padding: 14px 12px;
    }
    .wmg-info-row {
        flex-direction: column;
        gap: 0;
    }
    .wmg-poster-col {
        width: 100%;
        display: flex;
        gap: 14px;
        align-items: flex-start;
        margin-bottom: 14px;
    }
    .wmg-poster-img {
        width: 100px;
        flex-shrink: 0;
    }
    .wmg-poster-placeholder {
        width: 100px;
        flex-shrink: 0;
    }
    .wmg-movie-title {
        font-size: 18px;
    }
    .wmg-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    .wmg-meta-row {
        flex-direction: column;
        gap: 2px;
        padding: 8px 0;
    }
    .wmg-meta-label {
        min-width: unset;
        font-size: 13px;
    }
    .wmg-meta-value {
        font-size: 13px;
    }
    .wmg-description {
        font-size: 14px;
    }
    .wmg-faq-question {
        font-size: 14px;
        padding: 12px 0;
    }
    .wmg-faq-answer {
        font-size: 13px;
    }
    .wmg-searches-title,
    .wmg-faq-title,
    .wmg-related-title {
        font-size: 18px;
    }
    .wmg-search-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    .wmg-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .wmg-related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .wmg-archive-header h1 {
        font-size: 22px;
    }
}
