* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 8px;
}

.main-card {
    background: rgb(48, 44, 44);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* Input Section */
.input-section {
    margin-bottom: 25px;
}

.url-input-group {
    display: flex;
    gap: 12px;
}

.url-input-group input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.url-input-group input:focus {
    outline: none;
    border-color: #616161;
    box-shadow: 0 0 0 3px rgba(97, 97, 97, 0.2);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 66, 66, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-download {
    background: #48bb78;
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-download:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-danger:hover {
    background: #f56565;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #616161;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #fc8181;
}

/* Video Info */
.video-info {
    margin-top: 20px;
    border-top: 2px solid #e2e8f0;
    padding-top: 20px;
}

.video-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.thumbnail {
    width: 200px;
    height: 112px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.video-meta {
    flex: 1;
}

.video-meta h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #2d3748;
}

.video-meta p {
    color: #718096;
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.description {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quality Section */
.quality-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.quality-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: #4a5568;
}

.tab-btn:hover {
    border-color: #616161;
}

.tab-btn.active {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    border-color: #616161;
    color: white;
}

.streams-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.stream-item {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border: 2px solid transparent;
    flex: 1 1 200px;
    /* Allow growing and shrinking with 200px base */
    min-width: 220px;
    /* Prevent it from getting too small and squishing content */
}

.stream-item:hover {
    background: #edf2f7;
}

.stream-item .quality-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-right: 15px;
}

.size-col {
    display: flex;
    flex-direction: column;
    color: #718096;
    line-height: 1.1;
    margin-right: auto;
}

.size-col .size-num {
    font-size: 1rem;
}

.size-col .size-unit {
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 25px;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        padding: 20px;
    }

    .url-input-group {
        flex-direction: column;
    }

    .video-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .thumbnail {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 16/9;
    }

    .streams-list {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.8rem;
    }
}


/* ============== SEO CONTENT STYLES ============== */
.seo-content {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px;
    margin-top: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: #e2e8f0;
    text-align: left;
}

.seo-content h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.seo-content h2 {
    font-size: 1.6rem;
    color: #f8fafc;
    margin-top: 50px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.seo-content h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 26px;
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    border-radius: 4px;
}

.seo-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 1.05rem;
}

.seo-lead {
    font-size: 1.2rem;
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 40px;
    font-weight: 500;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    border-radius: 12px;
    color: #f8fafc;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Steps List */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.steps-list li {
    position: relative;
    padding-left: 55px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #cbd5e1;
    font-size: 1.05rem;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.steps-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.steps-list li strong {
    color: #ffffff;
    margin-right: 5px;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.faq-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 22px 28px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-item strong {
    display: block;
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 600;
}

.faq-item p {
    margin: 0;
    color: #a0aec0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Disclaimer */
.disclaimer {
    background: rgba(255, 193, 7, 0.08);
    border-left: 5px solid rgba(255, 193, 7, 0.8);
    padding: 22px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #fde68a;
    margin-top: 50px;
    line-height: 1.7;
    backdrop-filter: blur(5px);
}