/* YouTube Thumbnail Downloader - Modern Embedded Styles */

.ytd-hero-container {
    background: var(--main_color, #c8232c);
    color: #fff;
    padding-top: 40px;
    padding-bottom: 50px;
    position: relative;
}

.ytd-hero-container h1 {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.ytd-hero-container h2 {
    font-size: 22px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: none;
}

.ytd-form {
    max-width: 760px;
    margin: 0 auto;
}

.ytd-input-group {
    display: flex;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.ytd-input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 16px;
    color: #212121;
    outline: none;
    background: #fff;
}

.ytd-input::placeholder {
    color: #888;
}

.ytd-submit-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 16px;
    padding: 0 32px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ytd-submit-btn:hover {
    background: #333;
}

.ytd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ytd-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.ytd-btn-action {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ytd-btn-action:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
}

.ytd-badge-pill {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Status Alert */
.ytd-status-box {
    max-width: 760px;
    margin: 18px auto 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    display: none;
}

.ytd-status-error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.ytd-status-loading {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Results Section */
.ytd-results-section {
    padding: 40px 0;
    background: #fbfbfb;
}

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

.ytd-results-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.ytd-featured-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid #eaeaea;
}

.ytd-thumb-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytd-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytd-card-body {
    padding: 20px 24px;
}

.ytd-featured-badge {
    display: inline-block;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ytd-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.ytd-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ytd-chip {
    background: #f3f3f3;
    color: #444;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.ytd-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ytd-btn-dl {
    background: #c8232c;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.ytd-btn-dl:hover {
    background: #a91820;
    color: #fff;
    text-decoration: none;
}

.ytd-btn-copy {
    background: #f0f0f0;
    color: #222;
    border: 1px solid #ddd;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ytd-btn-copy:hover {
    background: #e2e2e2;
}

.ytd-btn-open {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.ytd-btn-open:hover {
    color: #c8232c;
    text-decoration: underline;
}

/* Variant Cards Grid */
.ytd-grid-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
}

.ytd-variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.ytd-variant-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ytd-variant-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.ytd-variant-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    overflow: hidden;
}

.ytd-variant-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytd-variant-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ytd-variant-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.ytd-variant-card .ytd-card-actions {
    margin-top: auto;
    padding-top: 12px;
}

.ytd-variant-card .ytd-btn-dl,
.ytd-variant-card .ytd-btn-copy {
    font-size: 13px;
    padding: 7px 12px;
}

/* Informational Content Blocks */
.ytd-info-section {
    padding: 50px 0;
}

.ytd-info-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 25px;
}

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

.ytd-step-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ytd-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--main_color, #c8232c);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
}

.ytd-step-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212121;
}

.ytd-step-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Sizes Table */
.ytd-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-top: 25px;
}

.ytd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.ytd-table th {
    background: #f7f7f7;
    padding: 12px 16px;
    font-weight: 600;
    color: #222;
    border-bottom: 2px solid #ddd;
    text-align: left;
}

.ytd-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.ytd-table tr:hover td {
    background: #fafafa;
}

.ytd-table code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c8232c;
    font-family: monospace;
}

/* FAQ Accordion / Cards */
.ytd-faq-list {
    max-width: 840px;
    margin: 30px auto 0;
}

.ytd-faq-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
}

.ytd-faq-question {
    padding: 18px 22px;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    transition: background 0.2s ease;
    user-select: none;
}

.ytd-faq-question:hover {
    background: #fcfcfc;
}

.ytd-faq-toggle {
    font-size: 20px;
    font-weight: 400;
    color: var(--main_color, #c8232c);
}

.ytd-faq-answer {
    padding: 0 22px 18px;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ytd-toast {
    pointer-events: auto;
    background: #212121;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: ytdSlideIn 0.3s ease;
}

.ytd-toast-success {
    border-left: 4px solid #4caf50;
}

.ytd-toast-info {
    border-left: 4px solid #2196f3;
}

.ytd-toast-error {
    border-left: 4px solid #f44336;
}

@keyframes ytdSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .ytd-hero-container h1 {
        font-size: 28px;
    }
    .ytd-hero-container h2 {
        font-size: 18px;
    }
    .ytd-input-group {
        flex-direction: column;
    }
    .ytd-submit-btn {
        padding: 14px;
        justify-content: center;
    }
    .ytd-card-body {
        padding: 16px;
    }
}
