@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ========================================
   ABC Favorit Font (Primary per Design Guidelines)
   ======================================== */
@font-face {
    font-family: 'ABC Favorit';
    src: url('/assets/fonts/ABCFavorit-Regular-Trial.woff2') format('woff2'),
         url('/assets/fonts/ABCFavorit-Regular-Trial.woff') format('woff'),
         url('/assets/fonts/ABCFavorit-Regular-Trial.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'ABC Favorit';
    src: url('/assets/fonts/ABCFavorit-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'ABC Favorit Mono';
    src: url('/assets/fonts/ABCFavoritMono-Medium-Trial.woff2') format('woff2'),
         url('/assets/fonts/ABCFavoritMono-Medium-Trial.woff') format('woff'),
         url('/assets/fonts/ABCFavoritMono-Medium-Trial.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

/* ========================================
   FilmProcessor Design System Variables
   ======================================== */
:root {
    --background-black: #000000;
    --heading-cyan: #00b9c7;
    --film-purple: #b40096;
    --title-white: #fffedc;
    --field-gray: #333333;
    --dcp-success: #22c55e;
    --film-gray-900: #111111;
    --film-gray-800: #1a1a1a;
    --film-gray-700: #2a2a2a;
    --film-gray-500: #666666;
    --error-red: #ef4444;
    --warning-orange: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'ABC Favorit', 'Inter', sans-serif;
    max-width: none;
    margin: 0;
    background: var(--background-black);
    color: var(--title-white);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ========================================
   Container
   ======================================== */
.container {
    padding: 0 150px 2rem 150px;
}

/* ========================================
   Title and Subtitle
   ======================================== */
.title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--title-white);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--heading-cyan);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: #000000;
    border: 1px solid var(--field-gray);
    border-radius: 0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    animation: fadeIn 0.5s ease-out;
}

.card:hover {
    border-color: var(--dcp-success);
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* ========================================
   Section Titles
   ======================================== */
.section-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--film-purple);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.035em;
    font-family: 'ABC Favorit', 'Inter', sans-serif;
    border-bottom: 1px solid var(--film-purple);
    padding-bottom: 0.5rem;
}

/* ========================================
   Upload Area
   ======================================== */
.upload-area {
    border: 1px dashed var(--field-gray);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: rgba(17, 17, 17, 0.3);
}

.upload-area:hover {
    border-color: var(--heading-cyan);
    background: rgba(0, 185, 199, 0.05);
}

.upload-area.dragover {
    border-color: var(--film-purple);
    background: rgba(180, 0, 150, 0.1);
    transform: scale(1.01);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.6;
    stroke: currentColor;
    color: var(--heading-cyan);
    pointer-events: none;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--title-white);
    margin-bottom: 0.5rem;
    font-weight: 400;
    pointer-events: none;
}

.upload-subtext {
    font-size: 0.85rem;
    color: #888;
    font-weight: 300;
    pointer-events: none;
}

/* ========================================
   Video Player Section
   ======================================== */
.video-player-section {
    display: none;
    margin-top: 1.5rem;
}

.video-player-section.visible {
    display: block;
}

.video-wrapper {
    position: relative;
    background: #000;
    width: 100%;
    border: 1px solid var(--field-gray);
    overflow: hidden;
}

video {
    width: 100%;
    height: auto;
    display: block;
    background: #000000;
    outline: none;
    border: none;
}

/* Custom Video Controls (Fileshare style) */
.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 15px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.video-wrapper:hover .video-controls-overlay {
    opacity: 1;
}

.video-main-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 28px;
}

.video-control-icon {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--film-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 0;
}

.video-control-icon:hover {
    color: #fffedc;
    transform: scale(1.1);
    background: transparent !important;
}

.video-control-icon:active {
    transform: scale(0.95);
}

/* Play/Pause Icon */
.play-icon::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 12px solid currentColor;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.play-icon.playing::before {
    border-left: 4px solid currentColor;
    border-top: 0;
    border-bottom: 0;
    width: 4px;
    height: 16px;
    box-shadow: 6px 0 0 currentColor;
}

/* Stop Icon */
.stop-icon::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background: currentColor;
}

.video-progress-container {
    flex: 1;
    margin: 0 12px;
    position: relative;
    min-height: 16px;
    display: flex;
    align-items: center;
}

.video-progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    border-radius: 0;
}

.video-progress-fill {
    height: 100%;
    background: rgba(255, 254, 220, 0.6);
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    border-radius: 0;
}

.video-progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fffedc;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 0;
    cursor: grab;
}

.video-progress-container:hover .video-progress-handle {
    opacity: 1;
}

.video-time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 80px;
    text-align: center;
}

.volume-slider {
    width: 100px;
    height: 2px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 0;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fffedc;
    cursor: pointer;
    border: 0;
    border-radius: 0 !important;
    box-shadow: none;
    margin-top: -5px;
}

.volume-slider::-moz-range-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 0;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fffedc;
    cursor: pointer;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ========================================
   Info Grid
   ======================================== */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-card {
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid var(--field-gray);
    padding: 1rem;
}

.info-card-title {
    font-size: 0.75rem;
    color: var(--film-purple);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-family: 'JetBrains Mono', monospace;
}

.info-value {
    color: var(--heading-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Hardware Info Section
   ======================================== */
.hardware-info {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    border: 1px solid var(--field-gray);
    padding: 0.5rem;
}

.hardware-row {
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.hardware-label {
    color: #888;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
    display: block;
}

.hardware-value {
    color: var(--heading-cyan);
    font-size: 0.8rem;
}

/* ========================================
   Processing Choice
   ======================================== */
.processing-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice-option {
    background: #000000;
    border: 1px solid #00b9c7;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-radius: 0;
}

.choice-option:hover {
    background: #00b9c7;
}

.choice-option:hover .choice-title {
    color: #000000;
}

.choice-option.selected {
    background: #00b9c7;
    border-color: #00b9c7;
}

.choice-option.selected .choice-title {
    color: #000000;
}

.choice-title {
    font-size: 0.85rem;
    color: #00b9c7;
    font-weight: 400;
    margin-bottom: 0;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.choice-description {
    font-size: 0.65rem;
    color: #888;
    line-height: 1.3;
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Processing Warning
   ======================================== */
.processing-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 12px 24px;
    background: #000000;
    border: 1px solid var(--warning-orange);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--warning-orange);
    text-align: center;
}

.warning-icon {
    display: none;
}

/* ========================================
   Settings Grid
   ======================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.75rem;
    color: var(--film-purple);
    margin-bottom: 0.4rem;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'JetBrains Mono', monospace;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    background: #000000;
    border: 1px solid #444;
    border-radius: 0;
    color: var(--title-white);
    font-size: 0.85rem;
    font-weight: 400;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
    line-height: 1.2;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--heading-cyan);
    box-shadow: 0 0 0 1px var(--heading-cyan);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-select {
    width: 100%;
    max-width: 100%;
    background: #000000;
    border: 1px solid var(--film-purple);
    border-radius: 0;
    padding: 8px 12px;
    color: var(--title-white);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23b40096' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 28px;
    line-height: 1.2;
    box-sizing: border-box;
}

.form-select:focus {
    border-color: var(--heading-cyan);
    box-shadow: 0 0 0 1px var(--heading-cyan);
}

.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-select option {
    background: #000000;
    color: var(--title-white);
    padding: 4px 8px;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: 400;
}

.form-select optgroup {
    color: var(--film-purple);
    font-weight: 500;
}

/* ========================================
   Preset Grid
   ======================================== */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    background: transparent;
    border: 1px solid var(--field-gray);
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    color: #888;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

.preset-btn:hover {
    border-color: var(--heading-cyan);
    color: var(--heading-cyan);
    background: rgba(0, 185, 199, 0.05);
}

.preset-btn.active {
    border-color: var(--dcp-success);
    color: var(--dcp-success);
    background: rgba(34, 197, 94, 0.1);
}

/* ========================================
   Resolution Inputs
   ======================================== */
.resolution-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resolution-inputs .form-input {
    width: 100px;
}

.resolution-separator {
    color: var(--heading-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Radio & Checkbox Groups
   ======================================== */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #888;
}

.radio-label input,
.checkbox-label input {
    accent-color: var(--heading-cyan);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    color: var(--heading-cyan);
}

/* ========================================
   Range Slider
   ======================================== */
.range-slider {
    width: 100%;
    height: 6px;
    background: var(--field-gray);
    border-radius: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--heading-cyan);
    border-radius: 0;
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--heading-cyan);
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #666;
    margin-top: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Summary Grid
   ======================================== */
.summary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.summary-panel,
.pricing-panel {
    display: flex;
    flex-direction: column;
}

.summary-row,
.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #222;
    font-size: 0.8rem;
}

.summary-row:last-of-type,
.pricing-row:last-of-type {
    border-bottom: none;
}

.summary-label,
.pricing-label {
    color: var(--title-white);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
}

.summary-value,
.pricing-value {
    color: var(--heading-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
}

/* ========================================
   FFmpeg Command Section
   ======================================== */
.ffmpeg-command-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--field-gray);
}

.ffmpeg-command {
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid var(--field-gray);
    padding: 0.75rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}

.ffmpeg-command code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--heading-cyan);
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--field-gray);
    color: #888;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.copy-btn:hover {
    border-color: var(--heading-cyan);
    color: var(--heading-cyan);
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-top: 1px solid var(--heading-cyan);
    margin-top: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.pricing-total .pricing-value {
    color: var(--dcp-success);
    font-size: 1.1rem;
    font-weight: 500;
}

.discount-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--field-gray);
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
}

.discount-input-group .form-input {
    flex: 1;
}

.apply-discount-btn {
    padding: 0.5rem 1rem;
    background: var(--film-purple);
    border: 1px solid var(--film-purple);
    color: var(--title-white);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    margin: 0;
}

.apply-discount-btn:hover {
    background: var(--heading-cyan);
    border-color: var(--heading-cyan);
}

.discount-message {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.5rem;
}

.discount-message.success {
    color: var(--dcp-success);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.discount-message.error {
    color: var(--error-red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ========================================
   Action Section
   ======================================== */
.action-section {
    margin-top: 1.5rem;
    text-align: center;
}

.primary-btn {
    background: var(--film-purple);
    color: var(--title-white);
    border: 1px solid var(--film-purple);
    border-radius: 0;
    padding: 1rem 3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.primary-btn:hover:not(:disabled) {
    background: var(--heading-cyan);
    border-color: var(--heading-cyan);
    box-shadow: 0 4px 12px rgba(0, 185, 199, 0.3);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ========================================
   Progress Section
   ======================================== */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #222;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--film-purple), var(--heading-cyan));
    transition: width 0.3s ease;
}

.progress-percentage {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--heading-cyan);
    min-width: 50px;
    text-align: right;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
    margin-bottom: 1rem;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.progress-label {
    color: #888;
    font-family: 'JetBrains Mono', monospace;
}

.progress-value {
    color: var(--title-white);
    font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Console Section
   ======================================== */
.console-section {
    margin-top: 1rem;
    border: 1px solid var(--field-gray);
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(17, 17, 17, 0.5);
    border-bottom: 1px solid var(--field-gray);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #888;
}

.console-toggle {
    background: transparent;
    border: 1px solid var(--field-gray);
    color: #888;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    margin: 0;
}

.console-toggle:hover {
    border-color: var(--heading-cyan);
    color: var(--heading-cyan);
}

.console-output {
    background: #000;
    padding: 0.75rem;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #888;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.cancel-btn {
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--error-red);
    color: var(--error-red);
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========================================
   Result Section
   ======================================== */
.result-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid var(--dcp-success);
    color: var(--dcp-success);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-text {
    font-size: 1.2rem;
    color: var(--dcp-success);
    font-weight: 500;
}

.result-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid var(--field-gray);
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.result-label {
    color: #888;
    font-family: 'JetBrains Mono', monospace;
}

.result-value {
    color: var(--heading-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--heading-cyan);
    color: var(--heading-cyan);
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(0, 185, 199, 0.1);
}

.action-btn.primary {
    background: var(--dcp-success);
    border-color: var(--dcp-success);
    color: #000;
}

.action-btn.primary:hover {
    background: #16a34a;
    border-color: #16a34a;
}

/* ========================================
   Log/Console
   ======================================== */
pre#log {
    background: #000;
    padding: 10px;
    overflow-x: hidden;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--title-white);
    margin: 0;
    border: 1px solid var(--field-gray);
    /* Allow long lines to wrap */
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
}

/* Custom scrollbar for console - black track with pink slider */
pre#log::-webkit-scrollbar {
    width: 10px;
}

pre#log::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #333;
}

pre#log::-webkit-scrollbar-thumb {
    background: #b40096;
    border-radius: 0;
}

pre#log::-webkit-scrollbar-thumb:hover {
    background: #d400b0;
}

/* Firefox scrollbar */
pre#log {
    scrollbar-width: thin;
    scrollbar-color: #b40096 #000;
}

/* ========================================
   Toast Notifications
   ======================================== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-notification {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--heading-cyan);
    color: var(--title-white);
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 350px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    border-color: var(--dcp-success);
}

.toast-notification.error {
    border-color: var(--error-red);
}

.toast-notification.warning {
    border-color: var(--warning-orange);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 2rem 2rem 2rem;
    }

    .settings-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .processing-choice {
        grid-template-columns: 1fr;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-details {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }
}

/* ========================================
   Enhanced Styles
   ======================================== */

/* Pink-accented inputs for Source Card */
.source-input-pink {
    background: transparent !important;
    border: 1px solid #b40096 !important;
    color: var(--title-white) !important;
    padding: 0.5rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.85rem !important;
    transition: border-color 0.2s ease !important;
}

.source-input-pink:hover {
    border-color: #d000b8 !important;
}

.source-input-pink:focus {
    outline: none !important;
    border-color: var(--heading-cyan) !important;
    box-shadow: 0 0 0 1px var(--heading-cyan) !important;
}

.source-select-pink {
    background: var(--background-black) !important;
    border: 1px solid #b40096 !important;
    color: var(--title-white) !important;
    padding: 0.5rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.source-select-pink:hover {
    border-color: #d000b8 !important;
}

.source-select-pink:focus {
    outline: none !important;
    border-color: var(--heading-cyan) !important;
}

/* Timeline Selection Overlay (In/Out Points) */
.video-progress-selection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.selection-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(51, 51, 51, 0.25);
}

.selection-active {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(255, 254, 220, 0.2);
}

.selection-after {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: rgba(51, 51, 51, 0.25);
}

/* Timecode Input Row */
.tc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tc-reset-btn {
    background: transparent;
    border: 1px solid var(--field-gray);
    color: var(--film-gray-500);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}

.tc-reset-btn:hover {
    border-color: #b40096;
    color: #b40096;
}

/* LUT Preview Canvas */
#lut-preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}

/* Action Button Grid (Start/Download side-by-side) */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-buttons button {
    width: 100%;
}

/* Mobile adjustments for new styles */
@media (max-width: 768px) {
    .tc-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}
