/* ============================================ */
/* CAST PAGE - PERSON DETAILS STYLES */
/* ============================================ */

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

body {
    background: #141414;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #fff;
}

/* ============================================ */
/* IMPORT SECTION - INSIDE CREDITS TABS */
/* ============================================ */
.import-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 30px;
    font-weight: 500;
}

.import-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.import-tab.active {
    color: #fff;
    background: #e50914;
}

.import-tab i {
    font-size: 1rem;
}

.import-tab .badge {
    background: rgba(255,255,255,0.1);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.import-tab.import-btn {
    background: linear-gradient(135deg, #e50914, #b20710);
    color: white;
}

.import-tab.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4);
    filter: brightness(1.1);
}

.import-tab.import-btn-auto {
    background: linear-gradient(135deg, #2d7d46, #1a5a30);
    color: white;
}

.import-tab.import-btn-auto:hover {
    box-shadow: 0 10px 30px rgba(45, 125, 70, 0.4);
    transform: translateY(-2px);
}

.import-status {
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 0.95rem;
    display: none;
    margin: 15px 4% 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.import-status.show {
    display: block;
    animation: slideDown 0.4s ease;
}

.import-status.success {
    background: rgba(45, 125, 70, 0.2);
    border: 1px solid #2d7d46;
    color: #7ddfa0;
}

.import-status.error {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid #e50914;
    color: #ff6b6b;
}

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

.import-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 12px 0 5px;
}

.import-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.import-stat .num {
    font-weight: 700;
    font-size: 1.1rem;
}

.import-stat .num.green { color: #7ddfa0; }
.import-stat .num.yellow { color: #ffd700; }
.import-stat .num.red { color: #ff6b6b; }
.import-stat .num.blue { color: #66ccff; }

.import-details {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.8;
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    font-family: monospace;
}

.import-details::-webkit-scrollbar {
    width: 6px;
}

.import-details::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

/* ============================================ */
/* MODAL STYLES */
/* ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 5000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 30px;
    max-width: 550px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.modal-content p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-actions .btn-primary {
    padding: 10px 30px;
    border: none;
    border-radius: 30px;
    background: #e50914;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-actions .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.modal-actions .btn-secondary {
    padding: 10px 30px;
    border: 1px solid #555;
    border-radius: 30px;
    background: transparent;
    color: #aaa;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-actions .btn-secondary:hover {
    border-color: #aaa;
    color: #fff;
}

.modal-actions .btn-auto {
    background: #2d7d46;
}

.modal-actions .btn-auto:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(45, 125, 70, 0.4);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e50914;
}

.checkbox-group label {
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
}

.info-box {
    background: rgba(229,9,14,0.08);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 3px solid #e50914;
}

.info-box p {
    font-size: 0.85rem;
    color: #ff6b6b;
    margin: 0;
}

.info-box-auto {
    background: rgba(45,125,70,0.08);
    border-left: 3px solid #2d7d46;
}

.info-box-auto p {
    color: #7ddfa0;
}

/* ============================================ */
/* HERO SECTION - PERSON PROFILE */
/* ============================================ */
.person-hero {
    position: relative;
    background: #1a1a1a;
    padding: 100px 4% 60px;
    min-height: 400px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.person-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #141414 0%, rgba(20,20,20,0.8) 50%, rgba(20,20,20,0.6) 100%);
    z-index: 0;
}

.person-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: flex-start;
}

.person-profile-image {
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.person-profile-placeholder {
    width: 300px;
    height: 400px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.person-profile-placeholder i {
    font-size: 80px;
    color: #555;
}

.person-info {
    flex: 1;
    padding-top: 10px;
}

.person-info h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.person-info .subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 20px;
}

.person-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.person-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.person-detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.person-detail-value {
    font-size: 0.95rem;
    color: #fff;
}

.person-detail-value a {
    color: #e50914;
    text-decoration: none;
    transition: color 0.2s;
}

.person-detail-value a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.social-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.social-link.imdb { background: #f5c518; color: #000; }
.social-link.facebook { background: #1877F2; }
.social-link.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-link.twitter { background: #1DA1F2; }
.social-link.tiktok { background: #000; border: 1px solid #333; }
.social-link.youtube { background: #FF0000; }
.social-link.homepage { background: #6c757d; }

/* ============================================ */
/* BIOGRAPHY SECTION */
/* ============================================ */
.biography-section {
    padding: 40px 4%;
    max-width: 100%;
    margin: 0 auto;
}

.biography-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.biography-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #ccc;
    max-width: 100%;
}

.biography-content p {
    margin-bottom: 15px;
}

/* ============================================ */
/* CREDITS SECTION */
/* ============================================ */
.credits-section {
    padding: 40px 4% 60px;
    max-width: 100%;
    margin: 0 auto;
}

.credits-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.credits-tab {
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 30px;
    font-weight: 500;
}

.credits-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.credits-tab.active {
    color: #fff;
    background: #e50914;
}

.credits-panel {
    display: none;
}

.credits-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.credits-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 1400px) {
    .credits-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1100px) {
    .credits-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .credits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .credits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 450px) {
    .credits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.credit-card {
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    display: block;
    position: relative;
}

.credit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.credit-poster {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.credit-poster-placeholder {
    width: 100%;
    min-height: 250px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #555;
}

.credit-info {
    padding: 12px;
}

.credit-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.credit-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #aaa;
}

.credit-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.credit-meta .star {
    color: #ffc107;
}

.credit-role {
    font-size: 0.7rem;
    color: #e50914;
    margin-top: 6px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.credit-role i {
    margin-right: 4px;
}

.credit-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 100%);
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
    border-radius: 0 0 10px 10px;
}

.credit-card:hover .credit-hover-info {
    transform: translateY(0);
}

.hover-text {
    font-size: 0.7rem;
    color: #ddd;
    margin: 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hover-text i {
    width: 16px;
    margin-right: 5px;
}

.credit-upcoming-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    color: #ffd700;
    margin-top: 4px;
}

/* ============================================ */
/* IMAGES GALLERY */
/* ============================================ */
.images-section {
    padding: 40px 4% 60px;
    max-width: 100%;
    margin: 0 auto;
}

.images-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.image-item {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    aspect-ratio: 2/3;
    background: #1a1a1a;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

/* ============================================ */
/* SHARE SECTION */
/* ============================================ */
.share-section {
    padding: 20px 4% 40px;
    max-width: 93%;
    margin: 0 auto;
    border-top: 1px solid #333;
}

.share-title {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.share-fb { background: #1877F2; }
.share-twitter { background: #1DA1F2; }
.share-wa { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-reddit { background: #FF4500; }
.share-copy { background: #6c757d; }

.copy-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e50914;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 2001;
    animation: fadeOut 2s ease forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); visibility: hidden; }
}

.no-data {
    color: #aaa;
    text-align: center;
    padding: 40px;
    font-style: italic;
}

/* ============================================ */
/* LIGHTBOX */
/* ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* ============================================ */
/* SCROLLBAR */
/* ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 1024px) {
    .person-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .person-profile-image,
    .person-profile-placeholder {
        width: 200px;
        height: 266px;
    }

    .person-info h1 {
        font-size: 2.5rem;
    }

    .person-details-grid {
        justify-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .biography-content {
        margin: 0 auto;
        text-align: center;
    }

    .credits-tabs {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .person-hero {
        padding: 80px 4% 40px;
        min-height: 300px;
    }

    .person-info h1 {
        font-size: 2rem;
    }

    .person-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .person-profile-image,
    .person-profile-placeholder {
        width: 150px;
        height: 200px;
    }

    .credits-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .import-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .share-buttons {
        gap: 6px;
    }

    .share-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }

    .credit-poster,
    .credit-poster-placeholder {
        min-height: 180px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .import-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .person-info h1 {
        font-size: 1.5rem;
    }

    .person-details-grid {
        grid-template-columns: 1fr;
    }

    .person-profile-image,
    .person-profile-placeholder {
        width: 120px;
        height: 160px;
    }

    .biography-content {
        font-size: 0.9rem;
    }

    .credit-poster,
    .credit-poster-placeholder {
        min-height: 150px;
    }

    .credit-title {
        font-size: 0.8rem;
    }

    .credit-meta {
        font-size: 0.65rem;
    }

    .import-summary {
        grid-template-columns: 1fr 1fr;
    }
}