/* Container Layout */
.yt-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Cards & UI */
.yt-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}
.text-center { text-align: center; }

.icon-circle.yt-icon {
    width: 72px; height: 72px;
    background: rgba(255, 0, 0, 0.08);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; margin: 0 auto 20px;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.yt-link-icon {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.yt-input {
    flex: 1;
    padding: 16px 16px 16px 48px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
}
.yt-input:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

.yt-btn {
    background: var(--primary-blue);
    color: white; border: none; padding: 0 28px;
    border-radius: 50px; font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.yt-btn:active { transform: scale(0.96); }

.error-msg {
    color: #ef4444; font-size: 0.9rem; font-weight: 600;
    margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.hidden { display: none !important; }

/* Divider */
.divider { border: 0; border-top: 1px dashed var(--border-color); margin: 40px 0; }

/* Thumbnails Grid */
.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.thumb-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.thumb-card:hover { transform: translateY(-4px); border-color: var(--primary-blue); }

.thumb-img-wrapper {
    width: 100%; aspect-ratio: 16/9;
    background: #000; position: relative;
    overflow: hidden;
}
.thumb-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.thumb-card:hover .thumb-img { transform: scale(1.03); }

.res-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,0.7); color: #fff;
    padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px);
}
.res-badge.pro { background: #10b981; } /* Green for HD */

.thumb-details { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.thumb-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.thumb-size { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }

.download-btn {
    display: block; width: 100%; text-align: center;
    background: transparent; border: 2px solid var(--border-color);
    color: var(--text-main); padding: 10px; border-radius: 50px;
    font-weight: 700; text-decoration: none; transition: all 0.2s;
}
.download-btn:hover { background: var(--bg-body); border-color: var(--primary-blue); color: var(--primary-blue); }
.download-btn.primary { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }
.download-btn.primary:hover { background: #1d4ed8; color: white; }

/* Animations & Modal */
.slide-down { animation: slideDown 0.5s ease backwards; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; opacity: 1; transition: opacity 0.3s ease; }
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content { background: var(--bg-surface); width: 100%; max-width: 400px; border-radius: 24px; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.2); transform: translateY(0); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.hidden .modal-content { transform: translateY(30px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.modal-body { padding: 24px; }
.info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.info-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.info-list i { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

/* Mobile */
@media (max-width: 600px) {
    .input-group { flex-direction: column; }
    .yt-btn { padding: 14px; width: 100%; }
}