:root {
    --primary-50: #fff3e0;
    --primary-100: #ffe0b2;
    --primary-200: #ffcc80;
    --primary-300: #ffb74d;
    --primary-400: #ffa726;
    --primary-500: #f97415;
    --primary-600: #f57c00;
    --primary-700: #ef6c00;
    --primary-800: #e65100;
    --primary-900: #bf360c;
    --primary: #f97415;

    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    --bg-primary: #0b101d;
    --bg-secondary: #1a2340;
    --bg-tertiary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #c4c4c4;
    --text-tertiary: #9e9e9e;
    --border-color: #404040;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 24px rgba(0, 0, 0, 0.4);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Light theme */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f5;
        --bg-tertiary: #eeeeee;
        --text-primary: #212121;
        --text-secondary: #616161;
        --text-tertiary: #757575;
        --border-color: #e0e0e0;
    }
}

/* Modern reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Improved accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
    min-height: 100vh;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-500);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1001;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Updated Header Styles from Functionality A */
header {
    background: rgba(23, 32, 60, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.site-logo a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo i {
    color: var(--primary-500);
}

.logo-image {
    width: auto;
    height: 48px;
    position: relative;
    /* top: 10px; */
}

.site-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.instant-tools {
    position: relative;
    display: inline-block;
}

.instnt-tools-btn {
    background: rgba(249, 116, 21, 0.1);
    border: 2px solid rgba(249, 116, 21, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.instnt-tools-btn:hover {
    background: rgba(249, 116, 21, 0.2);
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.instnt-tools-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.tools-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 80vw;
    max-width: 800px;
    min-width: 300px;
    background: #17203c;
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(249, 116, 21, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    overflow: hidden;
}

.tools-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.tools-content-container {
    padding: 2rem;
    width: 100%;
}

.tools-content-container h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tools-content-container h3 i {
    color: var(--primary-500);
}

.tools-grid-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-item-box {
    background: var(--bg-secondary);
    border: 1px solid rgba(249, 116, 21, 0.3);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.tool-item-box:hover {
    background: rgba(249, 116, 21, 0.1);
    border-color: var(--primary-500);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
}

.tool-item-box i {
    color: var(--primary-500);
    font-size: 1.2rem;
    width: 24px;
}

.tool-item-box span {
    font-weight: 500;
    font-size: 0.95rem;
}

.tools-footer-area {
    border-top: 1px solid rgba(249, 116, 21, 0.3);
    padding-top: 1.5rem;
}

.dropdown-site-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.dropdown-site-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
    white-space: nowrap;
}

.dropdown-site-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.dropdown-site-links a:hover {
    color: var(--text-primary);
}

.dropdown-site-links a:hover::after {
    width: 100%;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
    box-shadow: 0 4px 15px rgba(249, 116, 21, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 116, 21, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover,
.btn-outline:focus {
    border-color: var(--primary-500);
    color: var(--primary-500);
    transform: translateY(-2px);
}

.how-works-btn {
    background: var(--primary-500);
    color: white;
}

.how-works-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
}

/* Hero Section from Functionality A */
.headings-section {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 2rem auto 3rem;
    max-width: 1400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.headings-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(249, 116, 21, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.headings-content {
    max-width: 800px;
    margin: 0 auto;
}

.headings-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.headings-subtitle {
    font-size: 1.8rem;
    color: var(--primary-500);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.main-headings-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.headings-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.editing-btn {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(249, 116, 21, 0.3);
}

.editing-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(249, 116, 21, 0.4);
    background: linear-gradient(135deg, var(--primary-500) 0%, #ff8c42 100%);
}

.upload-disclaimer {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.trimming-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.trimming-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(23, 32, 60, 0.5);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(249, 116, 21, 0.3);
    transition: all 0.3s ease;
}

.trimming-feature-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-500);
    background: rgba(249, 116, 21, 0.1);
}

.trimming-feature-item i {
    color: var(--primary-500);
    font-size: 1.2rem;
}

.trimming-feature-item span {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Functionality Section from Functionality A with modifications for audio */
.functionality-section {
    background: rgba(23, 32, 60, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(249, 116, 21, 0.3);
}

.header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(249, 116, 21, 0.3);
}

.header-area h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.header-area h2 i {
    color: var(--primary-500);
}

/* Two Column Layout */
.editor-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Left Column */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Upload Area from Functionality A with modifications */
.upload-area {
    background: var(--bg-secondary);
    border: 3px dashed rgba(249, 116, 21, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249, 116, 21, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.upload-area:hover::before,
.upload-area.drag-over::before {
    opacity: 1;
}

.upload-area.drag-over {
    border-color: var(--primary-500);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 4rem;
    color: var(--primary-500);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 116, 21, 0.4);
}

.upload-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.upload-formats {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

#videoUpload {
    display: none;
}

/* File Queue from Functionality B (kept as is) */
.file-queue {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    overflow: hidden;
}

.file-queue-header {
    padding: 15px 20px;
    background-color: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-queue-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-queue-list {
    max-height: 300px;
    overflow-y: auto;
}

.file-queue-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color var(--transition-fast);
}

.file-queue-item:hover {
    background-color: rgba(249, 116, 21, 0.05);
}

.file-queue-item .file-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(249, 116, 21, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
}

.file-queue-item .file-details {
    flex: 1;
}

.file-queue-item .file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-queue-item .file-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.file-queue-item .file-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
}

.file-queue-item .file-status.completed {
    background-color: var(--success);
}

.file-queue-item .file-status.error {
    background-color: var(--error);
}

.file-queue-item .file-status.processing {
    background-color: var(--primary-500);
    animation: pulse 1s infinite;
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 5px;
    transition: color var(--transition-fast);
}

.file-remove:hover {
    color: var(--error);
}

/* Info cards from Functionality B (kept as is) */
.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
}

.info-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.info-card span {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-500);
}

/* Format selection from Functionality B (kept as is) */
.format-selection {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.format-selection h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.format-card {
    position: relative;
    cursor: pointer;
}

.format-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.format-card .format-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.format-card input[type="radio"]:checked+.format-content {
    border-color: var(--primary-500);
    background-color: rgba(249, 116, 21, 0.1);
    transform: scale(1.05);
}

.format-card .format-content i {
    font-size: 2rem;
    color: var(--primary-500);
}

.format-card .format-name {
    font-weight: 600;
}

.format-card .format-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Quality options */
.quality-options {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
}

.quality-slider {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    -webkit-appearance: none;
    appearance: none;
}

.quality-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-500);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quality-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--primary-500);
}

/* AI enhancement toggle */
.ai-enhancement {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(249, 116, 21, 0.1), transparent);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.ai-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-toggle input[type="checkbox"] {
    width: 50px;
    height: 25px;
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-tertiary);
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ai-toggle input[type="checkbox"]:checked {
    background-color: var(--primary-500);
}

.ai-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all var(--transition-fast);
}

.ai-toggle input[type="checkbox"]:checked::before {
    left: 27px;
}

.ai-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ai-toggle .badge {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

/* Trim options */
.trim-options {
    margin-top: 20px;
}

.trim-options h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.trim-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.trim-input {
    flex: 1;
    padding: 10px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.trim-input:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Progress section from Functionality B (kept as is) */
.progress-section {
    margin: 20px 0;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
    width: 0%;
    transition: width var(--transition-base);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-percent {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-500);
    min-width: 60px;
    text-align: right;
}

.progress-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-500);
    animation: pulse 2s infinite;
}

#estimatedTime {
    text-align: center;
    margin-top: 10px;
    color: var(--text-tertiary);
}

/* Waveform container from Functionality B (kept as is) */
.waveform-container {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.waveform {
    height: 100px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.waveform canvas {
    width: 100%;
    height: 100%;
}

/* Button group from Functionality B (kept as is) */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 20px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 120px;
}

/* Right Column */
#right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    overflow: hidden;
}

/* Video Info from Functionality A (adapted for audio) */
.video-info {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid rgba(249, 116, 21, 0.3);
}

.video-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-info-item i {
    font-size: 1.2rem;
    color: var(--primary-500);
}

/* Preview Container from Functionality A (adapted for audio) */
#preview-container {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    border: 1px solid rgba(249, 116, 21, 0.3);
    height: 400px;
    min-height: 300px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoPlaceholder {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

#videoPlaceholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

#videoPreview {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(23, 32, 60, 0.9));
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: rgba(249, 116, 21, 0.2);
    border: 1px solid rgba(249, 116, 21, 0.3);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.control-btn:hover {
    background: var(--primary-500);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.time-display {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Progress Container from Functionality A */
.progress-container {
    width: 100%;
    height: 40px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
    display: none;
}

.progress-bar {
    height: 100%;
    background: var(--primary-500);
    border-radius: 20px;
    transition: width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1;
}

/* Export Section from Functionality A (adapted for audio) */
.export-section {
    display: flex;
    gap: 1rem;
    margin-top: 40px;
}

.btn-download {
    flex: 2;
    padding: 1rem;
    background: var(--primary-500);
    color: var(--bg-primary);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    font-size: 15px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 116, 21, 0.4);
}

.btn-secondary {
    flex: 2;
    padding: 1rem;
    background: var(--primary-500);
    color: var(--bg-primary);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    font-size: 15px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 116, 21, 0.4);
}

/* Audio Preview Container from Functionality B (kept as is) */
.audio-preview-container {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

.audio-preview-container h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.audio-player-wrapper {
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
}

audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

audio::-webkit-media-controls-panel {
    background-color: var(--bg-tertiary);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-primary);
}

.audio-metadata {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.metadata-item {
    background-color: var(--bg-tertiary);
    padding: 12px;
    border-radius: 8px;
}

.metadata-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.metadata-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-500);
}

/* Empty State from Functionality B (kept as is) */
.empty-state {
    background-color: var(--bg-secondary);
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 100px 30px;
    text-align: center;
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* More Tools Section from Functionality A */
.more-tools-section {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.more-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-primary);
}

.more-title i {
    color: var(--primary-500);
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.more-tools-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(249, 116, 21, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.more-tools-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    border-color: var(--primary-500);
}

.more-cards-icon {
    width: 60px;
    height: 60px;
    background: rgba(249, 116, 21, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-500);
}

.more-tools-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tools-explanation {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tool-link:hover {
    gap: 0.8rem;
}

/* How It Works Section - EXACT from A */
.how-it-works-section {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
}

.how-it-works-header {
    text-align: center;
    margin-bottom: 3rem;
}

.how-it-works-header h2 {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.how-it-works-header h2 i {
    color: var(--primary);
}

.how-it-works-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 10px;
}

.timeline-area-steps {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timeline-area-steps:nth-child(odd) {
    left: 0;
}

.timeline-area-steps:nth-child(even) {
    left: 50%;
}

.timeline-area-steps::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background: var(--primary);
    border: 4px solid var(--secondary);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-area-steps:nth-child(odd)::after {
    right: -13px;
}

.timeline-area-steps:nth-child(even)::after {
    left: -13px;
}

.trimming-info {
    padding: 20px 30px;
    background: rgba(23, 32, 60, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.trimming-info:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.timeline-area-steps:nth-child(odd) .trimming-info {
    text-align: right;
}

.timeline-area-steps:nth-child(even) .trimming-info {
    text-align: left;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.timeline-area-steps:nth-child(odd) .step-number {
    float: right;
    margin-left: 15px;
}

.timeline-area-steps:nth-child(even) .step-number {
    float: left;
    margin-right: 15px;
}

.trimming-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.trimming-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.timeline-area-steps {
    position: relative;
    margin-bottom: 3rem;
}
.step-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.right-image {
    left: calc(100% + 30px);
}

.left-image {
    right: calc(100% + 30px);
}
.step-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    object-fit: cover;
    cursor: pointer;
}

.step-image img:hover {
    transform: scale(1.03);
    border-color: var(--primary);
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.3s ease;
}
.image-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    border: 3px solid var(--primary);
    box-shadow: 0 0 50px rgba(249, 116, 21, 0.5);
    object-fit: contain;
}
.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    font-size: 24px;
    color: white;
    border: none;
    box-shadow: 0 0 20px rgba(249, 116, 21, 0.5);
}

.image-modal-close:hover {
    transform: scale(1.1);
    background: #ff8c42;
}

.image-modal.show {
    display: block;
    opacity: 1;
}

.image-modal.show .image-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-area-steps {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-area-steps:nth-child(even) {
        left: 0;
    }

    .timeline-area-steps::after {
        left: 18px;
        right: auto;
    }

    .timeline-area-steps:nth-child(odd) .trimming-info,
    .timeline-area-steps:nth-child(even) .trimming-info {
        text-align: left;
    }

    .timeline-area-steps:nth-child(odd) .step-number,
    .timeline-area-steps:nth-child(even) .step-number {
        float: left;
        margin-right: 15px;
        margin-left: 0;
    }
}

/* Updated CSS for Audio Extractor Guide Section
   Now matches the dark theme of Shorts Creator section */

.audio-extractor-guide-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 60px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(249, 116, 21, 0.3);
    border-bottom: 1px solid rgba(249, 116, 21, 0.3);
}

.guide-container {
    max-width: 1300px;
    margin: 0 auto;
}

.guide-header {
    text-align: center;
    margin-bottom: 50px;
}

.guide-header h2 {
    font-size: 2.4rem;
    color: #fff;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #f97415);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-weight: 700;
}

.guide-header h2 i {
    background: none;
    -webkit-text-fill-color: #f97415;
    margin-right: 12px;
}

.guide-subhead {
    font-size: 1.1rem;
    color: #bbb;
    max-width: 800px;
    margin: 0 auto;
}

.guide-card {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 28px 35px;
    margin-bottom: 35px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.guide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 116, 21, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.guide-card h3 {
    font-size: 1.7rem;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
    border-left: 4px solid #f97415;
    padding-left: 16px;
}

.guide-card h3 i {
    font-size: 1.7rem;
    color: #f97415;
}

.guide-card p {
    font-size: 1rem;
    line-height: 1.65;
    color: #ddd;
    margin-bottom: 18px;
}

/* History Timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 15px;
}

.timeline-item {
    display: flex;
    gap: 25px;
    border-left: 3px solid #f97415;
    padding-left: 25px;
    transition: background 0.2s;
}

.timeline-item:hover {
    background: rgba(249, 116, 21, 0.05);
    border-radius: 0 12px 12px 0;
}

.timeline-year {
    min-width: 110px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #f97415;
    background: rgba(249, 116, 21, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    text-align: center;
    height: fit-content;
}

.timeline-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
    color: #f0f0f0;
}

.timeline-content p {
    margin-bottom: 0;
    color: #bbb;
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 20px 0;
}

.process-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.step-number {
    min-width: 45px;
    height: 45px;
    background: #f97415;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(249, 116, 21, 0.3);
}

.step-text strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
    color: #f0f0f0;
}

.step-text p {
    margin-bottom: 0;
    color: #bbb;
}

.simple-explanation {
    background: rgba(249, 116, 21, 0.1);
    border: 1px solid rgba(249, 116, 21, 0.3);
    padding: 18px 22px;
    border-radius: 16px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 20px;
}

.simple-explanation i {
    font-size: 2rem;
    color: #f97415;
}

.simple-explanation p {
    margin-bottom: 0;
    color: #ddd;
}

/* Formats Grid */
.formats-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

.format-card-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(30, 30, 40, 0.6);
    border-radius: 14px;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.format-card-item:hover {
    background: rgba(249, 116, 21, 0.1);
    border-color: rgba(249, 116, 21, 0.3);
}

.format-icon i {
    font-size: 1.8rem;
    color: #f97415;
    min-width: 45px;
}

.format-details strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
    color: #f0f0f0;
}

.format-details p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #bbb;
}

/* Enhancement Features */
.enhancement-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.enhancement-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 14px;
    border-left: 4px solid #22c55e;
    transition: transform 0.2s;
}

.enhancement-item:hover {
    transform: translateX(5px);
    background: rgba(34, 197, 94, 0.15);
}

.enhancement-item i {
    font-size: 1.6rem;
    color: #22c55e;
}

.enhancement-item strong {
    display: block;
    margin-bottom: 6px;
    color: #f0f0f0;
}

.enhancement-item p {
    margin-bottom: 0;
    color: #bbb;
}

.enhancement-note {
    background: rgba(249, 116, 21, 0.1);
    border-left: 3px solid #f97415;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 15px;
    font-style: italic;
    color: #ddd;
}

/* Use Cases */
.usecases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usecase {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 18px;
    background: rgba(30, 30, 40, 0.6);
    border-radius: 14px;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.usecase:hover {
    background: rgba(249, 116, 21, 0.1);
    border-color: rgba(249, 116, 21, 0.3);
}

.usecase i {
    font-size: 1.5rem;
    color: #f97415;
    min-width: 45px;
    text-align: center;
    margin-top: 3px;
}

.usecase strong {
    display: block;
    margin-bottom: 5px;
    color: #f0f0f0;
}

.usecase p {
    margin-bottom: 0;
    color: #bbb;
}

/* Tips List */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li::before {
    content: "💡";
    color: #f97415;
    font-size: 1.1rem;
}

/* Closing Card */
.guide-closing {
    text-align: center;
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid rgba(249, 116, 21, 0.3);
}

.guide-closing i {
    font-size: 2.8rem;
    color: #f97415;
    margin-bottom: 18px;
    display: inline-block;
}

.guide-closing p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .guide-card {
        padding: 20px;
    }

    .guide-card h3 {
        font-size: 1.5rem;
    }

    .guide-header h2 {
        font-size: 1.9rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
        padding-left: 18px;
    }

    .timeline-year {
        min-width: auto;
        width: fit-content;
    }

    .process-step {
        flex-direction: column;
    }

    .step-number {
        align-self: flex-start;
    }

    .simple-explanation {
        flex-direction: column;
    }

    .format-card-item {
        flex-direction: column;
        text-align: center;
    }

    .format-icon i {
        align-self: center;
    }

    .enhancement-item {
        flex-direction: column;
        text-align: center;
    }

    .enhancement-item i {
        align-self: center;
    }

    .usecase {
        flex-direction: column;
        text-align: center;
    }

    .usecase i {
        align-self: center;
    }

    .tips-list li {
        flex-direction: column;
        gap: 5px;
    }
}

/* Tips Section from Functionality A (adapted for audio) */
.tips-section {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: rgba(23, 32, 60, 0.5);
}

.tips-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-primary);
}

.tips-title i {
    color: var(--primary-500);
}

.trim-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tips-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(249, 116, 21, 0.3);
    transition: all 0.3s ease;
}

.tips-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    border-color: var(--primary-500);
}

.tip-counting {
    width: 40px;
    height: 40px;
    background: var(--primary-500);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 1rem;
}

.tip-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.tips-details {
    color: var(--text-secondary);
    line-height: 1.6;
}

.highlight {
    color: var(--primary-500);
    font-weight: 600;
}

/* Privacy & Security Section from Functionality A */
.privacy-section {
    padding: 5rem 0;
    position: relative;
    background: linear-gradient(135deg,
            rgba(13, 17, 23, 0.9) 0%,
            rgba(23, 32, 60, 0.9) 100%);
    margin: 4rem 0;
    overflow: hidden;
}

.privacy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(249, 116, 21, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(249, 116, 21, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.privacy-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(249, 116, 21, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 20s ease-in-out infinite alternate;
}

.privacy-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.privacy-card {
    background: rgba(23, 32, 60, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(249, 116, 21, 0.3);
    border-radius: 24px;
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.privacy-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary-500);
}

.privacy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(249, 116, 21, 0) 0%,
            rgba(249, 116, 21, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.privacy-card:hover::before {
    opacity: 1;
}

.privacy-header {
    margin-bottom: 3rem;
    position: relative;
}

.security-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--primary-500), rgba(249, 116, 21, 0.7));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 20px 40px rgba(249, 116, 21, 0.4);
    animation: pulse 4s ease-in-out infinite;
}

.security-icon::after {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    border: 2px solid rgba(249, 116, 21, 0.3);
    animation: ripple 4s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.privacy-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.privacy-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
    border-radius: 2px;
}

.privacy-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
}

.privacy-content {
    margin-bottom: 3rem;
}

.privacy-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: 2rem;
    background: rgba(23, 32, 60, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(249, 116, 21, 0.2);
    position: relative;
}

.privacy-text::before {
    content: '🔒';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    padding: 0 1rem;
    font-size: 1.5rem;
}

.privacy-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.privacy-feature {
    background: rgba(23, 32, 60, 0.5);
    border: 1px solid rgba(249, 116, 21, 0.3);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.privacy-feature:hover {
    transform: translateY(-8px);
    border-color: var(--primary-500);
    box-shadow: 0 15px 35px rgba(249, 116, 21, 0.2);
}

.privacy-feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(249, 116, 21, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-500);
}

.privacy-feature h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    text-align: center;
}

.privacy-feature p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.5;
}

.security-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(249, 116, 21, 0.1);
    border: 1px solid rgba(249, 116, 21, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.security-badge:hover {
    background: rgba(249, 116, 21, 0.2);
    transform: translateY(-3px);
    border-color: var(--primary-500);
}

.security-badge i {
    color: var(--primary-500);
    font-size: 1.1rem;
}

.privacy-commitment {
    background: linear-gradient(135deg,
            rgba(249, 116, 21, 0.1) 0%,
            rgba(23, 32, 60, 0.6) 100%);
    border: 1px solid rgba(249, 116, 21, 0.3);
    border-radius: 20px;
    padding: 2rem 3rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.privacy-commitment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 100% 0%, rgba(249, 116, 21, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(249, 116, 21, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.privacy-commitment i {
    font-size: 3rem;
    color: var(--primary-500);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.privacy-commitment-content {
    position: relative;
    z-index: 1;
}

.privacy-commitment h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.privacy-commitment p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

/* Copyright Compliance Notice from Functionality A */
.trimming-notice-section {
    max-width: 1200px;
    margin: 1.5rem auto 1rem;
    padding: 0 1.5rem;
}

.trimming-notice-card {
    background: rgba(249, 116, 21, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 116, 21, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trimming-notice-card:hover {
    border-color: var(--primary-500);
    background: rgba(249, 116, 21, 0.12);
    transform: translateY(-2px);
}

.trimming-notice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
            var(--primary-500) 0%,
            transparent 100%);
}

.notice-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(249, 116, 21, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-500);
}

.notice-content {
    flex: 1;
}

.notice-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.notice-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer from Functionality A */
footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(249, 116, 21, 0.3);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500) 0%, #ff8c42 50%, var(--primary-500) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.footer-brand {
    padding-right: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.footer-logo i {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--primary-500), #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(249, 116, 21, 0.3));
    background-clip: text;
}

.footer-logo h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin: 0;
    background-clip: text;
}

.footer-logo a {
    text-decoration: none;
    color: white;
    font-size: 35px;
    font-weight: 700;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 400px;
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid rgba(249, 116, 21, 0.3);
}

.footer-col {
    min-width: 150px;
}

.footer-col h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-500);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.footer-col:hover h3::after {
    width: 60px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}

.footer-col ul li::before {
    content: '▶';
    position: absolute;
    left: -20px;
    color: var(--primary-500);
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-col ul li:hover {
    padding-left: 20px;
    transform: translateX(5px);
}

.footer-col ul li:hover::before {
    opacity: 1;
    left: 0;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-500);
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary-500);
    transform: translateX(8px);
}

.footer-col a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249, 116, 21, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    background: rgba(249, 116, 21, 0.1);
    border-color: var(--primary-500);
    color: var(--primary-500);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(249, 116, 21, 0.2);
}

.copyright-area {
    text-align: center;
    padding-top: 3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(249, 116, 21, 0.2);
    margin-top: 3rem;
    position: relative;
}

.copyright-area::before {
    content: '🎬';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    padding: 0 1rem;
    font-size: 1.2rem;
}

/* Toast notifications from Functionality B */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-500);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight var(--transition-base);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--error);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color var(--transition-fast);
}

.toast-close:hover,
.toast-close:focus {
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notification from Functionality A */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(249, 116, 21, 0.2);
    padding: 1rem 1.5rem;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(249, 116, 21, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.success,
.notification.error,
.notification.info {
    border-left: 4px solid var(--primary-500);
}

.notification i {
    font-size: 1.5rem;
    color: var(--primary-500);
}

@media (min-width: 1400px){
    .step-image {
        width: 35%;
    }
    
    .right-image {
        left: calc(100% + 40px);
    }
    
    .left-image {
        right: calc(100% + 40px);
    }
    
    .step-image img {
        max-width: 450px;
    }
}

@media (min-width: 1200px) and (max-width: 1440px) {
    .step-image {
        width: 38%;
    }
    
    .right-image {
        left: calc(100% + 20px);
    }
    
    .left-image {
        right: calc(100% + 20px);
    }
    
    .step-image img {
        max-width: 320px;
    }
}



/* Responsive Design */
@media (max-width: 1200px) {
    .footer-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .step-image {
        width: 35%;
    }
    
    .right-image {
        left: calc(100% + 15px);
    }
    
    .left-image {
        right: calc(100% + 15px);
    }
    
    .step-image img {
        max-width: 280px;
    }
}

@media (max-width: 992px) {
    .headings-title {
        font-size: 2.5rem;
    }

    .headings-subtitle {
        font-size: 1.5rem;
    }

    .main-headings-description {
        font-size: 1.1rem;
    }

    .editor-box {
        grid-template-columns: 1fr;
    }

    #preview-container {
        height: 350px;
    }

    .header-box {
        flex-wrap: wrap;
    }

    .site-logo {
        order: 1;
    }

    .site-title-section {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }

    .user-actions {
        order: 2;
    }

    .tools-grid-box {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-container {
        width: 90vw;
        max-width: 700px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        padding-right: 0;
    }
    .step-image {
        position: relative;
        width: 100%;
        margin-top: 1.5rem;
        top: auto;
        transform: none;
    }
    
    .right-image,
    .left-image {
        left: auto;
        right: auto;
        position: relative;
    }
    
    .timeline-area-steps {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .timeline-area-steps .trimming-info {
        width: 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .step-image img {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Adjust timeline line for tablet */
    .timeline::after {
        left: 20px;
    }
    
    .timeline-area-steps {
        padding-left: 50px;
        width: 100%;
    }
    
    .timeline-area-steps:nth-child(even) {
        left: 0;
    }
    
    .timeline-area-steps::after {
        left: 10px;
        right: auto;
    }
    
    .timeline-area-steps:nth-child(odd) .trimming-info,
    .timeline-area-steps:nth-child(even) .trimming-info {
        text-align: left;
    }
    
    .timeline-area-steps:nth-child(odd) .step-number,
    .timeline-area-steps:nth-child(even) .step-number {
        float: left;
        margin-right: 15px;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .headings-section {
        padding: 2rem 1.5rem;
    }

    .headings-title {
        font-size: 2rem;
    }

    .headings-subtitle {
        font-size: 1.3rem;
    }

    .main-headings-description {
        font-size: 1rem;
    }

    .trimming-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .trimming-feature-item {
        width: 100%;
        justify-content: center;
    }

    #preview-container {
        height: 300px;
        min-height: 250px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .audio-metadata {
        grid-template-columns: 1fr;
    }

    .export-section {
        flex-direction: column;
    }

    .header-box {
        flex-direction: column;
        gap: 1rem;
    }

    .site-title-section {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .tools-container {
        width: 95vw;
        max-width: none;
        left: 50%;
        transform: translateX(-50%) scale(0.95);
    }

    .tools-container.show {
        transform: translateX(-50%) scale(1);
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
        padding-right: 0;
    }

    .brand-tagline {
        margin-left: auto;
        margin-right: auto;
        border-left: none;
        padding-left: 0;
        border-top: 3px solid rgba(249, 116, 21, 0.3);
        padding-top: 1rem;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-col ul li:hover {
        padding-left: 0;
        transform: translateX(0);
    }

    .footer-col ul li::before {
        display: none;
    }

    .social-links {
        justify-content: center;
    }

    .trimming-notice-card {
        padding: 1rem;
        gap: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .notice-icon {
        margin: 0 auto;
    }
    .step-image {
        position: relative;
        width: 100%;
        margin-top: 1.5rem;
        top: auto;
        transform: none;
    }
    
    .right-image,
    .left-image {
        left: auto;
        right: auto;
        position: relative;
    }
    
    .timeline-area-steps {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }
    
    .timeline-area-steps .trimming-info {
        width: 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .step-image img {
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* Adjust timeline for tablet portrait */
    .timeline::after {
        left: 30px;
    }
    
    .timeline-area-steps {
        padding-left: 60px;
        width: 100%;
    }
    
    .timeline-area-steps:nth-child(even) {
        left: 0;
    }
    
    .timeline-area-steps::after {
        left: 18px;
        right: auto;
    }
    
    .timeline-area-steps:nth-child(odd) .trimming-info,
    .timeline-area-steps:nth-child(even) .trimming-info {
        text-align: left;
    }
    
    .timeline-area-steps:nth-child(odd) .step-number,
    .timeline-area-steps:nth-child(even) .step-number {
        float: left;
        margin-right: 15px;
        margin-left: 0;
    }
.image-modal-content img {
        max-height: 70vh;
    }
    
    .image-modal-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
        font-size: 20px;
    }
}

@media (max-width: 575px){
    .step-image {
        position: relative;
        width: 100%;
        margin-top: 1.2rem;
        top: auto;
        transform: none;
    }
    
    .right-image,
    .left-image {
        left: auto;
        right: auto;
        position: relative;
        padding: 0;
    }
    
    .timeline-area-steps {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .timeline-area-steps .trimming-info {
        width: 100%;
        text-align: center;
        margin-bottom: 1.2rem;
        padding: 1rem;
    }
    
    .step-image img {
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Adjust timeline for mobile */
    .timeline::after {
        left: 20px;
    }
    
    .timeline-area-steps {
        padding-left: 45px;
        width: 100%;
    }
    
    .timeline-area-steps:nth-child(even) {
        left: 0;
    }
    
    .timeline-area-steps::after {
        left: 10px;
        right: auto;
        width: 18px;
        height: 18px;
        top: 10px;
    }
    
    .timeline-area-steps:nth-child(odd) .trimming-info,
    .timeline-area-steps:nth-child(even) .trimming-info {
        text-align: left;
    }
    
    .timeline-area-steps:nth-child(odd) .step-number,
    .timeline-area-steps:nth-child(even) .step-number {
        float: left;
        margin-right: 12px;
        margin-left: 0;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .trimming-info h3 {
        font-size: 1.1rem;
    }
    
    .trimming-info p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .headings-section {
        padding: 1.5rem 1rem;
    }

    .headings-title {
        font-size: 1.8rem;
    }

    .headings-subtitle {
        font-size: 1.1rem;
    }

    .main-headings-description {
        font-size: 0.95rem;
    }

    .editing-btn {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    #preview-container {
        height: 250px;
        min-height: 200px;
    }

    .format-grid {
        grid-template-columns: 1fr;
    }

    .trim-inputs {
        flex-direction: column;
    }

    .tools-grid-box {
        grid-template-columns: 1fr;
    }

    .tools-container {
        width: 98vw;
        min-width: 280px;
    }

    .dropdown-site-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .footer-col h3 {
        font-size: 1.2rem;
    }

    .privacy-card {
        padding: 2rem 1.5rem;
    }

    .privacy-header h2 {
        font-size: 1.8rem;
    }

    .security-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .privacy-text {
        font-size: 1rem;
        padding: 1rem;
    }

    .privacy-feature {
        padding: 1.5rem;
    }

    .privacy-feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .privacy-commitment {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .security-badges {
        flex-direction: column;
        align-items: center;
    }

    .security-badge {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .image-modal-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
        font-size: 18px;
    }
}
@media (max-width: 360px){
     .step-image img {
        max-width: 240px;
    }
    
    .timeline-area-steps {
        padding-left: 35px;
    }
    
    .timeline::after {
        left: 15px;
    }
    
    .timeline-area-steps::after {
        left: 6px;
        width: 16px;
        height: 16px;
    }
    
    .trimming-info {
        padding: 0.8rem;
    }
    
    .trimming-info h3 {
        font-size: 1rem;
    }
    
    .trimming-info p {
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {

    .header,
    .hero-actions,
    .btn,
    .footer {
        display: none;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    img {
        filter: brightness(0.8) contrast(1.2);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-500: #ff0000;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
    }
}

/* Utility class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Batch Download Panel - Independent styling that won't affect file-queue */
#batchDownloadPanel {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 20px 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

#batchDownloadPanel .batch-panel-header {
    padding: 15px 20px;
    background-color: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

#batchDownloadPanel .batch-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

#batchDownloadPanel .batch-panel-header h3 i {
    color: var(--primary-500);
    font-size: 1rem;
}

#batchDownloadPanel .batch-download-all-btn {
    background: var(--primary-500);
    color: var(--bg-primary);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 116, 21, 0.3);
    white-space: nowrap;
}

#batchDownloadPanel .batch-download-all-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 116, 21, 0.4);
}

#batchDownloadPanel .batch-download-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#batchDownloadPanel .batch-file-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

#batchDownloadPanel .batch-file-row {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color var(--transition-fast);
    background-color: transparent;
}

#batchDownloadPanel .batch-file-row:hover {
    background-color: rgba(249, 116, 21, 0.05);
}

#batchDownloadPanel .batch-file-row:last-child {
    border-bottom: none;
}

#batchDownloadPanel .batch-file-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(249, 116, 21, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
    flex-shrink: 0;
}

#batchDownloadPanel .batch-file-icon i {
    font-size: 1.1rem;
}

#batchDownloadPanel .batch-file-info {
    flex: 1;
    min-width: 0;
}

#batchDownloadPanel .batch-file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

#batchDownloadPanel .batch-file-size {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

#batchDownloadPanel .batch-single-download {
    background: transparent;
    color: var(--primary-500);
    border: 1px solid rgba(249, 116, 21, 0.4);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

#batchDownloadPanel .batch-single-download i {
    font-size: 0.8rem;
}

#batchDownloadPanel .batch-single-download:hover {
    background: var(--primary-500);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

/* ===== FIX FOR TIMELINE LAYOUT - Ensure proper spacing ===== */
@media (min-width: 992px) {
    .timeline {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    /* Ensure text doesn't overlap with images */
    .timeline-area-steps:nth-child(odd) .trimming-info {
        padding-right: 20px;
    }
    
    .timeline-area-steps:nth-child(even) .trimming-info {
        padding-left: 20px;
    }
}

/* ===== FALLBACK FOR BROWSERS THAT DON'T SUPPORT POSITIONING ===== */
@supports not (position: relative) {
    .step-image {
        position: relative;
        margin-top: 1rem;
        width: 100%;
    }
    
    .right-image,
    .left-image {
        left: auto;
        right: auto;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .step-image img:hover {
        transform: none;
    }
}

/* ===== REDUCED MOTION PREFERENCE ===== */
@media (prefers-reduced-motion: reduce) {
    .step-image img,
    .step-image img:hover {
        transition: none;
        transform: none;
    }
}