/* Modal Border Radius Updates */
.modal {
    border-radius: 3px !important;
}

/* Search Modal - Left Yellow Border Radius */
#search-modal {
    border-left: 5px solid var(--fenogram-yellow);
    border-top-left-radius: 3px !important;
    border-bottom-left-radius: 3px !important;
}

/* Modal Form Inputs */
.modal .form-group input,
.modal .form-group select,
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"],
.modal input[type="tel"] {
    border-radius: 3px !important;
}

/* Modal Buttons */
.modal .btn-primary,
.modal .btn-secondary,
.modal .btn-full,
.modal button[type="submit"] {
    border-radius: 3px !important;
}

/* Cart Sidebar Button */
.cart-checkout-btn {
    border-radius: 3px !important;
}

/* Content Detail Page - Favorite Button Icon */
.detail-btn-secondary svg {
    width: 18px !important;
    height: 18px !important;
}

/* Trailer Button - Icon Only, Same Size as Other Buttons */
.trailer-btn {
    width: 55px;
    height: 55px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 3px;
    color: var(--fenogram-white);
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.trailer-btn svg {
    width: 18px !important;
    height: 18px !important;
}

.trailer-btn .btn-text {
    display: none;
}

/* Fragman Popup Modal - Unique and Isolated with Slide Down Animation */
.fragman-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fragman-modal-overlay.fragman-active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.fragman-modal-container {
    max-width: 1100px;
    width: 95%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    border-radius: 3px;
    border: 1px solid rgba(128, 128, 128, 0.5);
    padding: 0;
    position: relative;
    transform: translateY(-100px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fragman-modal-overlay.fragman-active .fragman-modal-container {
    transform: translateY(0);
    opacity: 1;
}

/* Keyframe animation for slide down effect */
@keyframes fragmanSlideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fragman-modal-overlay.fragman-active .fragman-modal-container {
    animation: fragmanSlideDown 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fragman-close-btn {
    position: absolute;
    top: -55px;
    right: 0;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 3001;
}

.fragman-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.fragman-close-btn svg {
    transition: transform 0.2s ease;
}

.fragman-video-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
}

.fragman-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fragman-actions-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 0 0 3px 3px;
}

.fragman-actions-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.fragman-actions-buttons .fragman-btn {
    margin: 0;
}

.fragman-content-info {
    flex: 1;
    text-align: right;
}

.fragman-content-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--fenogram-white);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.fragman-content-meta {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--fenogram-text-gray);
    margin: 0;
}

/* Cast Section Redesign */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cast-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cast-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 138, 0.3);
}

.cast-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.cast-info {
    padding: 12px;
    text-align: left;
}

.cast-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fenogram-white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-role {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--fenogram-text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content Badge - Width Auto */
.content-badge,
.card-badge {
    padding: 4px 10px !important;
    width: auto !important;
    max-width: max-content !important;
    white-space: nowrap !important;
}

/* Synopsis Text - Tablet Size */
@media (max-width: 1024px) {
    .detail-hero-synopsis {
        font-size: 0.9rem !important;
        max-width: 500px !important;
    }
}

@media (max-width: 768px) {
    .trailer-btn {
        width: 60px;
        height: 40px;
    }
    
    .trailer-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .detail-hero-synopsis {
        font-size: 0.85rem !important;
        max-width: 100% !important;
    }
    
    .fragman-modal-container {
        width: 98%;
    }
    
    .fragman-close-btn {
        top: -50px;
        width: 40px;
        height: 40px;
    }
    
    .fragman-actions-wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
        align-items: flex-start;
    }
    
    .fragman-content-info {
        order: -1;
        text-align: left;
        width: 100%;
    }
    
    .fragman-content-title {
        font-size: 1.1rem;
    }
    
    .fragman-content-meta {
        font-size: 0.85rem;
    }
    
    .fragman-actions-buttons {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .fragman-actions-buttons .fragman-btn {
        flex: 1;
        min-width: calc(50% - 5px);
    }
    
    .fragman-actions-buttons .detail-btn-primary {
        flex: 1 1 100%;
    }
}