/* ==========================================
   YOUTUBE THUMBNAIL DOWNLOADER
   Light Mode SaaS UI
   ========================================== */

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
}

/* Container */
.ytt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

/* Header */
.ytt-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 0;
}

.ytt-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.ytt-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.ytt-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 16px;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.ytt-subtitle {
    font-size: 20px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Card */
.ytt-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    padding: 48px;
    margin-bottom: 64px;
    position: relative;
    overflow: hidden;
}

.ytt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

/* Input Group */
.ytt-input-group {
    margin-bottom: 24px;
}

.ytt-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ytt-input-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ytt-input {
    flex: 1;
    min-width: 250px;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    color: var(--gray-800);
    transition: all 0.2s;
    font-family: inherit;
}

.ytt-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.ytt-input::placeholder {
    color: var(--gray-400);
}

.ytt-hint {
    display: block;
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 8px;
}

/* Buttons */
.ytt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.ytt-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.ytt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.ytt-arrow {
    transition: transform 0.2s;
}

.ytt-btn-primary:hover .ytt-arrow {
    transform: translateX(2px);
}

.ytt-btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.ytt-btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.ytt-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary-light);
}

.ytt-btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* Result Section */
.ytt-result {
    animation: fadeIn 0.4s ease-out;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--gray-100);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ytt-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.ytt-preview-section {
    margin-bottom: 32px;
}

.ytt-image-box {
    position: relative;
    display: inline-block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--gray-100);
}

.ytt-preview-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.ytt-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Download Grid */
.ytt-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.ytt-download-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.ytt-download-card:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.ytt-quality {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.ytt-resolution {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

/* URL Box */
.ytt-url-box {
    background: var(--gray-50);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.ytt-copy-group {
    display: flex;
    gap: 12px;
}

.ytt-input-copy {
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 14px;
    background: var(--white);
}

/* Error */
.ytt-error {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fef2f2;
    color: #dc2626;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid #fecaca;
    margin-top: 16px;
}

.ytt-error-icon {
    font-size: 20px;
}

/* Toast */
.ytt-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-800);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.ytt-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* SEO Content */
.ytt-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 0;
}

.ytt-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 64px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.ytt-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 48px 0 16px;
}

.ytt-content p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.8;
}

.ytt-content strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* Grid 4 */
.ytt-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.ytt-feature {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.ytt-feature:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ytt-feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.ytt-feature h3 {
    font-size: 20px;
    margin: 0 0 8px;
    color: var(--gray-800);
}

.ytt-feature p {
    font-size: 16px;
    color: var(--gray-500);
    margin: 0;
}

/* Steps */
.ytt-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 32px 0;
}

.ytt-steps li {
    position: relative;
    padding-left: 64px;
    margin-bottom: 24px;
    font-size: 18px;
    color: var(--gray-600);
}

.ytt-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

/* List */
.ytt-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.ytt-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--gray-600);
}

.ytt-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
    width: 24px;
    height: 24px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Table */
.ytt-table-wrap {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.ytt-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 16px;
}

.ytt-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid var(--gray-200);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.05em;
}

.ytt-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.ytt-table tr:hover td {
    background: var(--gray-50);
}

/* Tips */
.ytt-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 48px 0;
}

.ytt-tip {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.ytt-tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.ytt-tip-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}

.ytt-tip h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.ytt-tip p {
    font-size: 16px;
    color: var(--gray-500);
    margin: 0;
}

/* FAQ */
.ytt-faq {
    margin: 48px 0;
}

.ytt-faq-item {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ytt-faq-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    padding: 20px;
    margin: 0;
    background: var(--gray-50);
    cursor: pointer;
}

.ytt-faq-item p {
    font-size: 16px;
    color: var(--gray-600);
    padding: 20px;
    margin: 0;
    border-top: 1px solid var(--gray-100);
}

/* CTA */
.ytt-cta {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    margin-top: 64px;
}

.ytt-cta h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 12px;
}

.ytt-cta p {
    font-size: 20px;
    color: var(--gray-600);
    margin: 0;
}

/* Code */
code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ytt-container {
        padding: 16px;
    }
    
    .ytt-title {
        font-size: 32px;
    }
    
    .ytt-subtitle {
        font-size: 16px;
    }
    
    .ytt-card {
        padding: 24px;
    }
    
    .ytt-input-wrapper {
        flex-direction: column;
    }
    
    .ytt-btn {
        width: 100%;
    }
    
    .ytt-download-grid {
        grid-template-columns: 1fr;
    }
    
    .ytt-copy-group {
        flex-direction: column;
    }
    
    .ytt-grid-4,
    .ytt-tips {
        grid-template-columns: 1fr;
    }
    
    .ytt-content h2 {
        font-size: 24px;
    }
}