/* Grok-inspired Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.main-subtitle {
    color: #4f46e5;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

/* Input Section */
.input-section {
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-container {
    display: flex;
    gap: 1rem;
    background: #1a1a1a;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

.url-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    color: #ffffff;
    font-family: inherit;
}

.url-input::placeholder {
    color: #666;
}

.analyze-btn {
    background: #4f46e5;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analyze-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

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

.analyze-btn.loading .btn-text {
    opacity: 0;
}

.analyze-btn.loading .spinner {
    opacity: 1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.input-hint {
    margin-top: 0.5rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* States */
.hidden {
    display: none !important;
}

/* Статистика загрузок */
.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 1.5rem;
    padding: 1.25rem 2rem;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0 2rem;
}

.stats-label {
    color: #888888;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stats-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #888;
    animation: fadeIn 0.5s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.error-state {
    text-align: center;
    padding: 3rem;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333;
    animation: fadeIn 0.5s ease;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.retry-btn {
    background: #4f46e5;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Video Info */
.video-info {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.video-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #333;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.video-thumbnail {
    position: relative;
    flex-shrink: 0;
}

.video-player {
    width: 360px;
    position: relative;
}

.video-player iframe {
    width: 100%;
    height: 202px;
    border-radius: 12px;
    border: 1px solid #333;
}

.duration-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.video-details h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.3;
}

.video-meta {
    color: #888;
    font-size: 0.9rem;
}

.separator {
    margin: 0 0.5rem;
}

/* Download Section */
.download-section {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #333;
}

/* Tabs */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    background: #0f0f0f;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 2rem;
    gap: 0.25rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.tab-btn:hover {
    background: #2a2a2a;
    color: #ffffff;
}

.tab-btn.active {
    background: #4f46e5;
    color: white;
}

.tab-content {
    width: 100%;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

.formats-list {
    display: grid;
    gap: 0.75rem;
}

.format-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #0f0f0f;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    transition: all 0.2s ease;
}

.format-item:hover {
    background: #2a2a2a;
    border-color: #4f46e5;
}

.format-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.format-icon {
    width: 46px;
    height: 36px;
    background: #4f46e5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.format-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.format-details p {
    font-size: 0.8rem;
    color: #888;
}

.download-btn {
    background: #4f46e5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Format actions container */
.format-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 120px;
}

/* Download progress in format items */
.download-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-progress .progress-bar {
    width: 100%;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.download-progress .progress-fill {
    height: 100%;
    background: #4f46e5;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.download-progress .progress-text {
    font-size: 0.7rem;
    color: #888;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress bar on full width under format */
.format-progress {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
}

.progress-bar-full {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
    backdrop-filter: blur(10px);
}

.progress-fill-full {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.progress-fill-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Специальные стили для разных состояний прогресса */
.progress-text-full.downloading {
    color: #ffffff;
}

.progress-text-full.finished {
    color: #10b981;
}

.progress-text-full.error {
    color: #ef4444;
}

.progress-text-full.starting {
    color: #6b7280;
}

.progress-text-full {
    font-size: 0.85rem;
    color: #a0a0a0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.progress-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.8;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    border: 1px solid #333;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ffffff;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: #4f46e5;
    width: 0%;
    transition: width 0.3s ease;
}

.modal-body p {
    color: #888;
    text-align: center;
}

/* Error Modal Styles */
.error-modal {
    z-index: 1001;
}

.error-content {
    background: #1a1a1a;
    border: 1px solid #dc2626;
    max-width: 500px;
}

.error-content .modal-header {
    border-bottom: 1px solid #dc2626;
}

.error-content .modal-header h3 {
    color: #dc2626;
}

.error-suggestions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.error-suggestions h4 {
    color: #dc2626;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.error-suggestions ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #ccc;
    font-size: 0.85rem;
}

.error-suggestions li {
    margin-bottom: 0.25rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    font-size: 0.9rem;
}

.footer-heart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.heart-icon {
    color: #ff4757;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid #333;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #444;
    background: #1f1f1f;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #ffffff;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-arrow {
    transition: transform 0.3s ease;
    color: #888;
}

.faq-item.expanded .faq-arrow {
    transform: rotate(180deg);
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.faq-item.expanded .faq-answer {
    max-height: 200px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .video-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .video-thumbnail {
        margin-bottom: 1rem;
    }

    .video-player {
        width: 100%;
        max-width: 480px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .main-subtitle {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .input-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .url-input {
        font-size: 16px;
        /* Предотвращает зум на iOS */
        padding: 0.75rem;
    }

    .analyze-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        margin: 1rem 0;
    }

    .stats-item {
        padding: 0.75rem;
        text-align: center;
    }

    .video-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        align-items: center;
        text-align: center;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
        overflow: hidden;
    }

    .video-thumbnail {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .video-player {
        width: 100%;
        max-width: 360px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .video-player iframe {
        width: 100%;
        max-width: 100%;
        height: 180px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
    }

    .video-details h2 {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        color: #ffffff;
    }

    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        font-size: 0.85rem;
        color: #a0a0a0;
    }

    .tabs-header {
        flex-direction: row;
        gap: 0.125rem;
        overflow-x: auto;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .tab-btn {
        min-width: 100px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
        text-align: center;
        border-radius: 6px;
        background: transparent;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }

    .tab-btn.active {
        background: rgba(79, 70, 229, 0.2);
        border-color: rgba(79, 70, 229, 0.3);
        color: #ffffff;
    }

    .format-item {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.75rem;
        text-align: left;
        align-items: center;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 0.5rem;
    }

    .format-info {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-start;
        flex: 1;
    }

    .format-icon {
        font-size: 1.1rem;
        min-width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        flex-shrink: 0;
    }

    .format-details {
        flex: 1;
        min-width: 0;
    }

    .format-details h4 {
        font-size: 0.95rem;
        margin-bottom: 0.125rem;
        font-weight: 600;
        color: #ffffff;
    }

    .format-details p {
        font-size: 0.8rem;
        color: #a0a0a0;
        margin: 0;
    }

    .format-actions {
        flex-shrink: 0;
    }

    .download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 80px;
        border-radius: 6px;
    }

    .progress-text-full {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        flex-wrap: wrap;
        gap: 0.5rem;
        text-align: center;
        justify-content: center;
        color: #ffffff;
        font-weight: 500;
    }

    .progress-icon {
        width: 16px;
        height: 16px;
    }

    .format-progress {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        transform: rotateY(180deg);
        backface-visibility: hidden;
        z-index: 10;
    }

    .format-item {
        position: relative;
        perspective: 1000px;
        transform-style: preserve-3d;
        transition: transform 0.6s ease;
    }

    .format-info,
    .format-actions {
        transition: opacity 0.3s ease;
    }

    .format-item.downloading {
        transform: rotateY(180deg);
    }

    .format-item.downloading .format-info,
    .format-item.downloading .format-actions {
        opacity: 0;
        pointer-events: none;
    }

    .format-item.downloading .format-progress {
        opacity: 1;
        pointer-events: auto;
    }

    .format-progress {
        opacity: 0;
        pointer-events: none;
    }

    .progress-bar-full {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 1rem;
        position: relative;
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }

    .progress-fill-full {
        height: 100%;
        background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
        width: 0%;
        transition: width 0.3s ease, background 0.3s ease;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

    /* Стили для списка форматов как в приложении */
    .formats-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-panel {
        padding: 0;
    }

    .tab-panel h3 {
        margin-bottom: 0.75rem;
        font-size: 1rem;
        color: #ffffff;
        text-align: center;
    }

    /* FAQ адаптивные стили для планшетов */
    .faq-section {
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .faq-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .faq-item.expanded .faq-answer {
        padding: 0 1rem 1rem;
    }

    .faq-answer p {
        font-size: 0.85rem;
    }



    /* Десктопная версия - без эффекта переворота */
    @media (min-width: 769px) {
        .format-item {
            position: relative;
            perspective: none;
            transform-style: flat;
            transition: none;
        }

        .format-item.downloading {
            transform: none;
        }

        .format-item.downloading .format-info,
        .format-item.downloading .format-actions {
            opacity: 1;
            pointer-events: auto;
        }

        .format-progress {
            position: static;
            transform: none;
            backface-visibility: visible;
            opacity: 1;
            pointer-events: auto;
            margin-top: 0.5rem;
            padding: 0.75rem;
            width: 100%;
            box-sizing: border-box;
            display: block;
        }
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .logo h1 {
        font-size: 1.6rem;
    }

    .main-subtitle {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .input-container {
        padding: 0.5rem;
    }

    .url-input {
        padding: 0.5rem;
        font-size: 16px;
    }

    .analyze-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .stats-container {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .stats-item {
        padding: 0.5rem;
    }

    .video-card {
        padding: 0.75rem;
    }

    .video-player {
        width: 100%;
        max-width: 280px;
    }

    .video-player iframe {
        height: 158px;
    }

    .video-details h2 {
        font-size: 1.1rem;
    }

    .tabs-header {
        gap: 0.125rem;
        padding: 0.375rem;
        margin-bottom: 0.75rem;
    }

    .tab-btn {
        min-width: 90px;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .format-item {
        padding: 0.5rem;
        gap: 0.5rem;
        margin-bottom: 0.375rem;
    }

    .format-info {
        gap: 0.5rem;
    }

    .format-icon {
        font-size: 0.9rem;
        min-width: 32px;
        height: 32px;
    }

    .format-details h4 {
        font-size: 0.85rem;
        margin-bottom: 0.125rem;
    }

    .format-details p {
        font-size: 0.7rem;
    }

    .download-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        min-width: 70px;
    }

    .progress-text-full {
        font-size: 0.75rem;
        padding: 0.25rem 0;
    }

    .progress-icon {
        width: 14px;
        height: 14px;
    }

    .progress-bar-full {
        height: 6px;
        margin-bottom: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .format-progress {
        padding: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .progress-text-full {
        font-size: 0.8rem;
        gap: 0.375rem;
    }

    /* Дополнительные стили для очень маленьких экранов */
    .formats-list {
        gap: 0.375rem;
    }

    .tab-panel h3 {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    .video-card {
        padding: 0.75rem;
        gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .video-player iframe {
        height: 150px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* FAQ адаптивные стили для маленьких экранов */
    .faq-section {
        margin-top: 1.5rem;
        padding: 0.75rem 0;
    }

    .faq-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .faq-question {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .faq-item.expanded .faq-answer {
        padding: 0 0.75rem 0.75rem;
    }

    .faq-answer p {
        font-size: 0.8rem;
    }
}

/* SEO Content Section Styles */
.seo-content-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin: 2.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.seo-content-container h2 {
    color: #ffffff;
    font-size: 1.9rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.seo-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content-item {
    background: transparent;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.seo-content-item:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.2);
}

.seo-content-item h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-content-item h3::before {
    content: "▸";
    font-size: 1.1rem;
    color: #4f46e5;
    font-weight: 600;
}

.seo-content-item p {
    color: #cccccc;
    line-height: 1.7;
    font-size: 1rem;
}

/* Responsive adjustments for SEO content */
@media (max-width: 768px) {
    .seo-content-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }

    .seo-content-container h2 {
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
    }

    .seo-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .seo-content-item {
        padding: 1.2rem;
    }

    .seo-content-item h3 {
        font-size: 1.1rem;
    }

    .seo-content-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}