/* YouTube Thumbnail Extractor */

.yt-thumb-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

/* Search */
.yt-thumb-search-section {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.yt-thumb-search-box {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 6px;
    border-radius: 8px;
}

.yt-thumb-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    border: none;
    outline: none;
    border-radius: 6px;
}

.yt-thumb-btn-search {
    padding: 5px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #cc0000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.yt-thumb-btn-search:hover { background: #aa0000; }
.yt-thumb-btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

.yt-thumb-btn-search .btn-loader {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yt-spin 0.7s linear infinite;
}

.yt-thumb-btn-search.loading .btn-text { display: none; }
.yt-thumb-btn-search.loading .btn-loader { display: inline-block; }

@keyframes yt-spin { to { transform: rotate(360deg); } }

.yt-thumb-hint {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin: 12px 0 0;
    text-align: center;
}

/* Error */
.yt-thumb-error {
    background: #fee2e2;
    border-radius: 8px;
    padding: 14px;
    color: #dc2626;
    text-align: center;
    margin-bottom: 20px;
}

/* Grid */
.yt-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card */
.yt-thumb-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.yt-thumb-card-image {
    background: #f0f0f0;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-thumb-card-image img { width: 100%; display: block; }
.yt-thumb-card-image .img-error { color: #999; font-size: 13px; }

.yt-thumb-card-info { padding: 14px; }

.yt-thumb-card-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.yt-thumb-card-size {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.yt-thumb-card-actions { display: flex; gap: 8px; }

.yt-thumb-btn {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.yt-thumb-btn-download {
    background: #10b981;
    color: #fff;
}
.yt-thumb-btn-download:hover { background: #059669; color: #fff; }

.yt-thumb-btn-copy { background: #f3f4f6; color: #374151; }
.yt-thumb-btn-copy:hover { background: #e5e7eb; }
.yt-thumb-btn-copy.copied { background: #dcfce7; color: #16a34a; }

.hidden { display: none !important; }
input#yt-thumb-url {
    padding: 5px 10px;
}
/* Responsive */
@media (max-width: 600px) {
    .yt-thumb-search-box { flex-direction: column; }
    .yt-thumb-btn-search { width: 100%; }
    .yt-thumb-grid { grid-template-columns: 1fr; }
}

