/* =========================================
   USER REQUESTED THEME (Dark + Green Check + Red/Green Buttons)
   ========================================= */

#resultModal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Darker backdrop */
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#resultModal.modal-overlay.active {
    display: flex;
    opacity: 1;
}

#resultContainer .result-card {
    background: #0f1014;
    /* Very dark background */
    border: 1px solid #1f2937;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    /* Slightly narrower as per image */
    padding: 30px 24px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Inter', sans-serif;
    text-align: center;
    overflow: hidden;
}

#resultModal.modal-overlay.active .result-card {
    transform: translateY(0) scale(1);
}

/* Close Button */
.modal-close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

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

/* 1. Green Success Checkmark */
.success-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.4);
}

.success-icon-wrapper i {
    color: #fff;
    font-size: 1.8rem;
}

/* 2. Heading */
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: -0.02em;
}

/* 3. Thumbnail Area */
.thumb-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    height: 180px;
    /* Fixed height for consistency */
    background: #000;
}

.modal-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Contain to show full video ratio */
    backdrop-filter: blur(10px);
}

.thumb-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3;
    filter: blur(10px);
}

.thumb-img-front {
    position: relative;
    z-index: 1;
    height: 100%;
    width: auto;
    margin: 0 auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 4. Title & Info */
.video-meta-title {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.video-meta-author {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 20px;
}

/* 5. Metadata Grid (Platform, Quality, Duration) */
.meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 25px;
    background: #18191e;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #2a2b30;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    color: #6b7280;
}

.meta-value {
    color: #fff;
    font-weight: 500;
}

/* 6. Buttons (Red & Green) */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, opacity 0.2s;
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-red {
    background: #e70000;
    /* YouTube Red style */
    box-shadow: 0 4px 12px rgba(231, 0, 0, 0.3);
}

.btn-green {
    background: #10b981;
    /* Green style */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-icon-adjust {
    font-size: 1.1em;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}