/* assets/frontend.css */

.hvm-frontend-container {
    
    border-radius: 20px;
    padding: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #d0f0d8;
}

/* Search and Filter Section */
.hvm-search-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.hvm-search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.hvm-search-field {
    width: 100%;
    background: rgba(6, 45, 26, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 25px;
    padding: 15px 50px 15px 20px;
    color: #d0f0d8;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hvm-search-field:focus {
    outline: none;
    border-color: rgba(0, 255, 204, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.2);
}

.hvm-search-field::placeholder {
    color: #7a9c7f;
}

.hvm-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #022a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.hvm-filter-box {
    min-width: 200px;
}

.hvm-category-select {
    width: 100%;
    background: rgba(6, 45, 26, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
    color: #d0f0d8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hvm-category-select:focus {
    outline: none;
    border-color: rgba(0, 255, 204, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.2);
}

/* Videos Grid */
.hvm-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    transition: opacity 0.3s ease;
}

/* Video Card */
.hvm-video-card {
    background: rgba(6, 45, 26, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.hvm-video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00ffcc, #48ff96);
    border-radius: 20px 20px 0 0;
}

.hvm-video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 204, 0.3);
    border-color: rgba(0, 255, 204, 0.5);
}

/* Video Thumbnail */
.hvm-video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.hvm-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hvm-video-card:hover .hvm-video-thumbnail {
    transform: scale(1.05);
}

.hvm-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.hvm-video-card:hover .hvm-play-overlay {
    opacity: 1;
}

.hvm-play-button {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #00ffcc, #48ff96);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #022a1a;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.hvm-play-overlay:hover .hvm-play-button {
    transform: scale(1.1);
}

.hvm-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Video Content */
.hvm-video-content {
    padding: 20px;
}

.hvm-video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.hvm-video-title {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.hvm-video-category {
    background: rgba(0, 255, 204, 0.2);
    color: #00ffcc;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.hvm-video-description {
    color: #b7e6c4;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.hvm-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
    color: #7a9c7f;
}

.hvm-video-views,
.hvm-video-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hvm-video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.hvm-tag {
    background: rgba(72, 217, 125, 0.2);
    color: #48d97d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.hvm-video-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.hvm-watch-btn {
    flex: 1;
    background: linear-gradient(135deg, #00ffcc, #48ff96);
    color: #022a1a;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.hvm-watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 204, 0.4);
}

.hvm-share-btn {
    background: rgba(6, 45, 26, 0.8);
    color: #b7e6c4;
    border: 1px solid rgba(0, 255, 204, 0.3);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
}

.hvm-share-btn:hover {
    background: rgba(6, 45, 26, 1);
    border-color: rgba(0, 255, 204, 0.5);
    color: #00ffcc;
    transform: translateY(-2px);
}

/* Loading and Empty States */
.hvm-loading {
    text-align: center;
    padding: 40px;
    color: #7a9c7f;
}

.hvm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 204, 0.3);
    border-top: 4px solid #00ffcc;
    border-radius: 50%;
    animation: hvm-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes hvm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hvm-no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    color: #7a9c7f;
}

.hvm-no-videos-icon {
    font-size: 4rem;
    color: #48d97d;
    margin-bottom: 20px;
}

.hvm-no-videos h3 {
    color: #a3e3b0;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.hvm-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #ff8c8c;
    background: rgba(255, 140, 140, 0.1);
    border: 1px solid rgba(255, 140, 140, 0.3);
    border-radius: 15px;
}

/* Enhanced Video Modal - 75% Screen Size */
.hvm-video-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.hvm-video-modal.active {
    display: flex;
}

.hvm-modal-content {
    background: linear-gradient(145deg, #022e1b, #074123);
    border-radius: 20px;
    padding: 0;
    width: 52vw;
    height: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalZoomIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hvm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.3);
    background: rgba(6, 45, 26, 0.9);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.hvm-modal-title {
    color: #a3e3b0;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: calc(100% - 60px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hvm-close-modal {
    background: linear-gradient(135deg, rgba(255, 140, 140, 0.2), rgba(255, 108, 108, 0.2));
    border: 1px solid rgba(255, 140, 140, 0.4);
    color: #ff8c8c;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    line-height: 1;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hvm-close-modal:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 140, 140, 0.4), rgba(255, 108, 108, 0.4));
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 140, 140, 0.3);
}

.hvm-modal-body {
    position: relative;
    background: #000000;
    overflow: hidden;
}

.hvm-video-player {
    width: 100%;
    height: 39.375vw;
    border: none;
    background: #000000;
}

/* Loading state for video */
.hvm-video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #a3e3b0;
    font-size: 1.2rem;
    z-index: 10;
    text-align: center;
}

.hvm-video-loading .hvm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 204, 0.3);
    border-top: 4px solid #00ffcc;
    border-radius: 50%;
    animation: hvm-spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Fullscreen button */
.hvm-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 204, 0.4);
    color: #00ffcc;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.hvm-fullscreen-btn:hover {
    background: rgba(0, 255, 204, 0.2);
    transform: scale(1.05);
}

/* Video controls overlay */
.hvm-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
}

.hvm-modal-content:hover .hvm-video-controls {
    opacity: 1;
}

.hvm-video-info {
    color: #ffffff;
    text-align: center;
}

.hvm-video-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #a3e3b0;
}

.hvm-video-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #b7e6c4;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hvm-modal-content {
        width: 80vw;
    }
    
    .hvm-video-player {
        height: 45vw;
    }
}

@media (max-width: 768px) {
    .hvm-frontend-container {
        padding: 20px;
    }
    
    .hvm-search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .hvm-search-box,
    .hvm-filter-box {
        min-width: 100%;
    }
    
    .hvm-videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hvm-video-thumbnail-container {
        height: 180px;
    }
    
    .hvm-video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hvm-video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Mobile Modal Adjustments */
    .hvm-modal-content {
        width: 95vw;
    }
    
    .hvm-video-player {
        height: 53.4vw;
    }
    
    .hvm-modal-title {
        font-size: 1.1rem;
        max-width: calc(100% - 50px);
    }
    
    .hvm-modal-header {
        padding: 15px 20px;
    }
    
    .hvm-close-modal {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .hvm-fullscreen-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px;
        font-size: 14px;
    }
    
    .hvm-video-controls {
        padding: 15px;
    }
    
    .hvm-video-info h4 {
        font-size: 1rem;
    }
    
    .hvm-video-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hvm-frontend-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .hvm-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .hvm-video-card {
        border-radius: 15px;
    }
    
    .hvm-video-content {
        padding: 15px;
    }
    
    .hvm-video-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .hvm-share-btn {
        width: 100%;
        height: auto;
        padding: 12px 20px;
    }
    
    /* Mobile Modal - Even Smaller Screens */
    .hvm-modal-content {
        width: 98vw;
    }
    
    .hvm-video-player {
        height: 55.1vw;
    }
    
    .hvm-modal-title {
        font-size: 1rem;
    }
    
    .hvm-modal-header {
        padding: 12px 15px;
    }
    
    .hvm-close-modal {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Large Screen Enhancements */
@media (min-width: 1400px) {
    .hvm-modal-content {
        width: 70vw;
        max-width: 1400px;
    }
    
    .hvm-video-player {
        height: 39.375vw;
        max-height: 787px;
    }
    
    .hvm-modal-title {
        font-size: 1.6rem;
    }
    
    .hvm-modal-header {
        padding: 25px 35px;
    }
    
    .hvm-fullscreen-btn {
        bottom: 25px;
        right: 25px;
        padding: 15px;
        font-size: 16px;
    }
}

/* Ultra-wide Screen Support */
@media (min-width: 1600px) {
    .hvm-modal-content {
        width: 65vw;
        max-width: 1600px;
    }
    
    .hvm-video-player {
        height: 36.5625vw;
        max-height: 900px;
    }
}

/* Landscape Mobile Modal */
@media (max-width: 768px) and (orientation: landscape) {
    .hvm-modal-content {
        width: 90vw;
    }
    
    .hvm-video-player {
        height: 50.6vw;
    }
    
    .hvm-modal-header {
        padding: 10px 20px;
    }
    
    .hvm-modal-title {
        font-size: 1rem;
    }
    
    .hvm-close-modal {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .hvm-fullscreen-btn {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
}

/* Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    .hvm-modal-content {
        animation: none;
    }
    
    .hvm-close-modal,
    .hvm-fullscreen-btn {
        transition: none;
    }
    
    .hvm-video-controls {
        transition: none;
    }
}