.modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 80rem;
    max-height: 90vh;
    background: rgba(11, 11, 31, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 0 100px rgba(192, 0, 255, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1) rotate(90deg);
}

.modal-hero {
    position: relative;
    height: 25rem;
    overflow: hidden;
}

.modal-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 31, 1), rgba(11, 11, 31, 0.5), transparent);
}

.modal-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
}

.modal-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-meta-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: linear-gradient(to right, #c000ff, #0078ff);
    color: var(--text-white);
    box-shadow: 0 0 30px rgba(192, 0, 255, 0.6);
}

.modal-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(192, 0, 255, 0.8);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.modal-description {
    color: var(--text-gray);
    line-height: 1.8;
}

.modal-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.modal-related-card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-related-card:hover {
    transform: scale(1.05);
}

.modal-related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-related-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-related-card:hover .modal-related-overlay {
    opacity: 1;
}

.modal-related-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.modal-related-card:hover .modal-related-info {
    opacity: 1;
    transform: translateY(0);
}

.modal-related-title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-related-meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.modal-related .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #c000ff, #0078ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.24s ease;
    box-shadow: 0 8px 20px rgba(192, 0, 255, 0.6);
    border: none;
    cursor: pointer;
}

.modal-related-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
}

.modal-related .play-btn svg { width: 1.4rem; height: 1.4rem; }

@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-hero {
        height: 20rem;
    }

    .modal-hero-content {
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-related {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.modal {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 20px;
    background: rgba(20, 20, 35, 0.95);
    padding: 1.5rem;
    animation: modalPop 0.3s ease-out;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

@keyframes modalPop {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #111;
    color: white;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}



