/* YouTube Thumbnail Downloader Plugin Styles */

.ytd-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ytd-header {
    text-align: center;
    margin-bottom: 30px;
}

.ytd-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.ytd-youtube-icon {
    width: 40px;
    height: 40px;
    background: #ff0000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.ytd-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.ytd-description {
    color: #888;
    font-size: 0.95rem;
}

.ytd-input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.ytd-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.ytd-input-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.ytd-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ytd-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.ytd-url-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ytd-extract-btn {
    padding: 12px 24px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.ytd-extract-btn:hover {
    background: #1e40af;
}

.ytd-extract-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.ytd-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.ytd-loading.active {
    display: block;
}

.ytd-error {
    display: none;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
}

.ytd-error.active {
    display: block;
}

.ytd-results {
    display: none;
}

.ytd-results.active {
    display: block;
}

.ytd-results-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ytd-results-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.ytd-video-id {
    background: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #374151;
}

.ytd-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ytd-thumbnail-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ytd-thumbnail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ytd-thumbnail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.ytd-thumbnail-info {
    padding: 16px;
}

.ytd-thumbnail-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.ytd-thumbnail-resolution {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.ytd-quality-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ytd-quality-hd {
    background: #fbbf24;
    color: #92400e;
}

.ytd-quality-sd {
    background: #a78bfa;
    color: #5b21b6;
}

.ytd-quality-hq {
    background: #34d399;
    color: #065f46;
}

.ytd-quality-mq {
    background: #60a5fa;
    color: #1e40af;
}

.ytd-quality-default {
    background: #e5e7eb;
    color: #374151;
}

.ytd-download-btn {
    width: 100%;
    padding: 10px 16px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ytd-download-btn:hover {
    background: #047857;
}

.ytd-instructions {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.ytd-instructions-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.ytd-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ytd-step {
    text-align: center;
}

.ytd-step-number {
    width: 40px;
    height: 40px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 auto 12px;
}

.ytd-step-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ytd-step-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ytd-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ytd-container {
        padding: 15px;
    }
    
    .ytd-title {
        font-size: 2rem;
    }
    
    .ytd-input-group {
        flex-direction: column;
    }
    
    .ytd-extract-btn {
        width: 100%;
    }
    
    .ytd-thumbnails-grid {
        grid-template-columns: 1fr;
    }
    
    .ytd-steps {
        grid-template-columns: 1fr;
    }
}

/* Animation for loading */
@keyframes ytd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ytd-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: ytd-spin 1s linear infinite;
    margin-right: 8px;
}

