/* ================================================================
   動画・音声 ファイルサイズ計算ツール
   Prefix: fsc- (File Size Calculator)
   ================================================================ */

/* ----------------------------------------------------------------
   Container
   ---------------------------------------------------------------- */
.fsc-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ----------------------------------------------------------------
   Tabs
   ---------------------------------------------------------------- */
.fsc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
}

.fsc-tab-btn {
    flex: 1;
    padding: 12px 10px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fsc-tab-btn:hover {
    background: #ede7f6;
    color: #555;
}

.fsc-tab-btn.active {
    background: #fff;
    color: #6200ea;
    border-bottom-color: #6200ea;
}

.fsc-tab-content {
    display: none;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    padding: 24px;
}

.fsc-tab-content.active {
    display: block;
}

/* ----------------------------------------------------------------
   Preset Buttons
   ---------------------------------------------------------------- */
.fsc-preset-section {
    margin-bottom: 20px;
}

.fsc-preset-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #555;
    font-weight: 700;
}

.fsc-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fsc-preset-btn {
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    white-space: nowrap;
}

.fsc-preset-btn:hover {
    border-color: #b39ddb;
    background: #ede7f6;
}

.fsc-preset-btn.active {
    border-color: #6200ea;
    background: #ede7f6;
    color: #6200ea;
}

/* ----------------------------------------------------------------
   Input Row (Slider + Number)
   ---------------------------------------------------------------- */
.fsc-input-section {
    margin-bottom: 20px;
}

.fsc-input-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.fsc-input-label {
    min-width: 115px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
    flex-shrink: 0;
}

.fsc-slider-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fsc-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.fsc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6200ea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(98, 0, 234, .3);
}

.fsc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6200ea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(98, 0, 234, .3);
}

.fsc-num-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Consolas', monospace;
    text-align: right;
    box-sizing: border-box;
}

.fsc-num-input:focus {
    outline: none;
    border-color: #6200ea;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, .1);
}

.fsc-unit-label {
    font-size: 12px;
    color: #888;
    min-width: 40px;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Duration Input (H:M:S)
   ---------------------------------------------------------------- */
.fsc-duration-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.fsc-duration-input {
    width: 60px;
    padding: 8px 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Consolas', monospace;
    text-align: center;
    box-sizing: border-box;
}

.fsc-duration-input:focus {
    outline: none;
    border-color: #6200ea;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, .1);
}

.fsc-duration-sep {
    font-size: 20px;
    font-weight: 700;
    color: #999;
}

.fsc-duration-label {
    font-size: 11px;
    color: #999;
    margin-right: 6px;
}

/* ----------------------------------------------------------------
   Result Card
   ---------------------------------------------------------------- */
.fsc-result-card {
    background: linear-gradient(135deg, #6200ea 0%, #00bcd4 100%);
    border-radius: 12px;
    padding: 24px;
    color: #fff;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(98, 0, 234, .25);
}

.fsc-result-main {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 6px;
}

.fsc-result-sub {
    font-size: 14px;
    opacity: .85;
}

.fsc-result-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s;
    border: none;
    color: #fff;
    font-family: inherit;
}

.fsc-result-summary:hover {
    background: rgba(255, 255, 255, .35);
}

.fsc-result-summary.copied {
    background: rgba(67, 160, 71, .6);
}

/* ----------------------------------------------------------------
   Visual Bars (Comparison)
   ---------------------------------------------------------------- */
.fsc-bars-section {
    margin: 16px 0 0;
}

.fsc-bars-section h4 {
    margin: 0 0 12px;
    font-size: 13px;
    color: #666;
    font-weight: 700;
}

.fsc-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fsc-bar-label {
    min-width: 130px;
    font-size: 12px;
    color: #555;
    text-align: right;
    flex-shrink: 0;
}

.fsc-bar-track {
    flex: 1;
    height: 18px;
    background: #eee;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.fsc-bar-fill {
    height: 100%;
    border-radius: 9px;
    background: linear-gradient(90deg, #6200ea, #00bcd4);
    transition: width .4s ease;
    min-width: 2px;
}

.fsc-bar-fill.over {
    background: linear-gradient(90deg, #e53935, #ff6d00);
}

.fsc-bar-pct {
    min-width: 45px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Reference Table
   ---------------------------------------------------------------- */
.fsc-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.fsc-ref-table th {
    background: #f3e5f5;
    color: #6200ea;
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
}

.fsc-ref-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.fsc-ref-table tr:hover td {
    background: #faf5ff;
}

.fsc-ref-table .mono {
    font-family: 'Consolas', monospace;
    font-weight: 600;
}

/* ----------------------------------------------------------------
   Unit Converter (Tab 3)
   ---------------------------------------------------------------- */
.fsc-convert-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fsc-convert-input {
    flex: 1;
    min-width: 120px;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    font-family: 'Consolas', monospace;
    text-align: right;
    box-sizing: border-box;
}

.fsc-convert-input:focus {
    outline: none;
    border-color: #6200ea;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, .1);
}

.fsc-convert-select {
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    background: #fafafa;
    cursor: pointer;
    font-family: inherit;
}

.fsc-convert-eq {
    font-size: 24px;
    font-weight: 700;
    color: #999;
}

.fsc-convert-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #666;
}

.fsc-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.fsc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fsc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.fsc-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.fsc-toggle-switch input:checked+.fsc-toggle-slider {
    background: #6200ea;
}

.fsc-toggle-switch input:checked+.fsc-toggle-slider::before {
    transform: translateX(20px);
}

/* Unit conversion results table */
.fsc-convert-results {
    background: #f8f5ff;
    border-radius: 10px;
    padding: 16px 20px;
}

.fsc-convert-results-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #ede7f6;
    font-size: 14px;
}

.fsc-convert-results-row:last-child {
    border-bottom: none;
}

.fsc-convert-results-label {
    color: #777;
}

.fsc-convert-results-value {
    font-family: 'Consolas', monospace;
    font-weight: 700;
    color: #333;
}

/* ----------------------------------------------------------------
   Audio Mode extras
   ---------------------------------------------------------------- */
.fsc-audio-type-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.fsc-audio-type-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    color: #555;
}

.fsc-audio-type-btn.active {
    border-color: #6200ea;
    background: #ede7f6;
    color: #6200ea;
}

/* ----------------------------------------------------------------
   Section sub-headers in tabs
   ---------------------------------------------------------------- */
.fsc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #6200ea;
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fsc-section-title:first-child {
    margin-top: 0;
}

.fsc-hint {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
    .fsc-tabs {
        flex-direction: column;
    }

    .fsc-input-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fsc-slider-wrap {
        width: 100%;
    }

    .fsc-bar-label {
        min-width: 90px;
        font-size: 11px;
    }

    .fsc-result-main {
        font-size: 28px;
    }

    .fsc-convert-row {
        flex-direction: column;
    }

    .fsc-convert-input {
        width: 100%;
    }

    .fsc-presets-grid {
        gap: 6px;
    }

    .fsc-preset-btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .fsc-duration-row {
        flex-wrap: wrap;
    }
}