/* Documentation Styles */
.doc-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    margin-top: 70px;
    margin-bottom: 50px;
}

.doc-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.doc-hero .lead {
    font-size: 1.3rem;
    opacity: 0.9;
}

.doc-sidebar {
    position: sticky;
    top: 90px;
    height: calc(100vh - 90px);
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.doc-sidebar h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.doc-sidebar .nav-link {
    color: #64748b;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.doc-sidebar .nav-link:hover,
.doc-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.doc-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.doc-content h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.doc-content h3 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.doc-content h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
}

.doc-content p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #475569;
}

.doc-content ul, .doc-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.doc-content li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #475569;
}

/* Code Blocks */
pre[class*="language-"] {
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

code[class*="language-"] {
    font-family: 'Fira Code', 'Consolas', monospace;
}

.inline-code {
    background: #f1f5f9;
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Alert Boxes */
.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #f0f9ff;
    border-left-color: var(--accent-color);
    color: #0c4a6e;
}

.alert-warning {
    background: #fffbeb;
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--success-color);
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-left-color: var(--danger-color);
    color: #991b1b;
}

/* GitHub Button */
.github-btn {
    background: linear-gradient(45deg, #333, #24292e);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.github-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.feature-card .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto auto 26px;
}

.feature-card .icon i {
    font-size: 24px;
    color: white;
}

/* Screenshots */
.screenshot-container {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}


/* Code Blocks */
pre[class*="language-"] {
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

code[class*="language-"] {
    font-family: 'Fira Code', 'Consolas', monospace;
}

.inline-code {
    background: #f1f5f9;
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Alert Boxes */
.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #f0f9ff;
    border-left-color: var(--accent-color);
    color: #0c4a6e;
}

.alert-warning {
    background: #fffbeb;
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--success-color);
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-left-color: var(--danger-color);
    color: #991b1b;
}

/* GitHub Button */
.github-btn {
    background: linear-gradient(45deg, #333, #24292e);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.github-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.feature-card .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto auto 26px;
}

.feature-card .icon i {
    font-size: 24px;
    color: white;
}

/* Screenshots */
.screenshot-container {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}

.stage-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 2rem 1rem;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .stage-container {
        flex-direction: row;
        gap: 0;
    }
}

.stage {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.icon-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 6rem;
}

.icon {
    width: 4rem;
    height: 4rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.transcoding-gears {
    position: relative;
    width: 120px;
    height: 80px;
    margin: 2rem auto 0;
}

.gear {
    position: absolute;
    width: 80px;
    height: 80px;
    fill: var(--gear-color);
    animation: spin 4s linear infinite;
}

.gear.small {
    width: 40px;
    height: 40px;
    top: 40px;
    left: 55px;
    animation: spin-reverse 4s linear infinite;
}

.transcoding-labels {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-weight: 500;
}

.format-logo {
    width: 60px;
    margin-bottom: 0.5rem;
}

.apple-logo {
    fill: currentColor;
    width: 24px;
    height: 30px;
    margin-bottom: 0.5rem;
}

.format-label {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow-container {
    display: none;
}

@media (min-width: 768px) {
    .arrow-container {
        display: flex;
        align-items: center;
        flex: 0.5;
    }
}

.arrow {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    position: relative;
}

.arrow::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 10px solid var(--primary-color);
}

.vertical-arrow-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .vertical-arrow-container {
        display: none;
    }
}

.vertical-arrow {
    width: 2px;
    height: 30px;
    background-color: var(--primary-color);
    position: relative;
}

.vertical-arrow::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid var(--primary-color);
}

/* Common styles for both video files */
.video-file-base {
    position: absolute;
    width: 50px;
    height: 50px;
    z-index: 10;
    will-change: transform, opacity;
}

.video-file-base img {
    width: 100%;
    height: 100%;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Specific animation for input file */
.video-file-in {
    animation: move-video-in 10s linear infinite;
}

/* Specific animation for output file */
.video-file-out {
    animation: move-video-out 10s linear infinite;
}

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

@keyframes spin-reverse {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* --- Desktop Animation Keyframes --- */
@keyframes move-video-in {
    0% {
        top: 180px;
        left: 15%;
        opacity: 0;
        transform: scale(0.8) translateX(-50%);
    }
    5% {
        top: 180px;
        left: 15%;
        opacity: 1;
        transform: scale(1) translateX(-50%);
    }
    45% {
        top: 180px;
        left: 50%;
        opacity: 1;
        transform: scale(1.2) translateX(-50%);
    }
    50% {
        top: 180px;
        left: 50%;
        opacity: 0;
        transform: scale(0.8) translateX(-50%);
    }
    100% {
        top: 180px;
        left: 50%;
        opacity: 0;
    }
}

@keyframes move-video-out {
    0% {
        top: 180px;
        left: 50%;
        opacity: 0;
        transform: scale(0.8) translateX(-50%);
    }
    50% {
        top: 180px;
        left: 50%;
        opacity: 1;
        transform: scale(1.2) translateX(-50%);
    }
    55% {
        top: 180px;
        left: 50%;
        opacity: 1;
        transform: scale(1) translateX(-50%);
    }
    95% {
        top: 180px;
        left: 85%;
        opacity: 1;
        transform: scale(1) translateX(-50%);
    }
    100% {
        top: 180px;
        left: 85%;
        opacity: 0;
        transform: scale(0.8) translateX(-50%);
    }
}

/* --- Mobile Animation Keyframes --- */
@media (max-width: 767px) {
    @keyframes move-video-in {
        0% {
            top: 250px;
            left: 50%;
            opacity: 0;
            transform: scale(0.8) translateX(-50%);
        }
        5% {
            top: 250px;
            left: 50%;
            opacity: 1;
            transform: scale(1) translateX(-50%);
        }
        45% {
            top: 530px;
            left: 50%;
            opacity: 1;
            transform: scale(1.2) translateX(-50%);
        }
        50% {
            top: 530px;
            left: 50%;
            opacity: 0;
            transform: scale(0.8) translateX(-50%);
        }
        100% {
            top: 530px;
            left: 50%;
            opacity: 0;
        }
    }

    @keyframes move-video-out {
        0% {
            top: 530px;
            left: 50%;
            opacity: 0;
            transform: scale(0.8) translateX(-50%);
        }
        50% {
            top: 530px;
            left: 50%;
            opacity: 1;
            transform: scale(1.2) translateX(-50%);
        }
        55% {
            top: 530px;
            left: 50%;
            opacity: 1;
            transform: scale(1) translateX(-50%);
        }
        75% {
            top: 810px;
            left: 50%;
            opacity: 1;
            transform: scale(1) translateX(-50%);
        }
        95% {
            top: 810px;
            left: 50%;
            opacity: 0;
            transform: scale(0.8) translateX(-50%);
        }
        100% {
            top: 810px;
            left: 50%;
            opacity: 0;
        }
    }
}


/* Responsive */
@media (max-width: 768px) {
    .doc-hero h1 {
        font-size: 2rem;
    }

    .doc-content {
        padding: 20px;
    }

    .doc-sidebar {
        position: static;
        height: auto;
        margin-bottom: 20px;
    }
}
