/* ============================================================
   KNOVILLA SFX GENERATOR
   style.css
   ============================================================ */


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    min-height: 100%;
}


body {
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f4f7fb;
    color: #172033;

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}


/* ============================================================
   APP
   ============================================================ */

.app {
    width: 100%;
    max-width: 760px;

    margin: 0 auto;
    padding: 24px 18px 40px;
}


/* ============================================================
   HEADER
   ============================================================ */

.app-header {
    margin-bottom: 24px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}


.brand-mark {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #2563eb;
    color: #ffffff;

    font-size: 23px;
    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.18);
}


.brand h1 {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}


.brand p {
    margin-top: 2px;

    color: #687386;

    font-size: 0.88rem;
}


/* ============================================================
   CONTENT
   ============================================================ */

.content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ============================================================
   PANELS
   ============================================================ */

.panel {
    padding: 22px;

    background: #ffffff;

    border: 1px solid #e4e9f1;
    border-radius: 18px;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.04);
}


.section-heading {
    margin-bottom: 18px;
}


.section-heading h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}


.section-heading p {
    margin-top: 3px;

    color: #778195;

    font-size: 0.86rem;
}


/* ============================================================
   PRESET
   ============================================================ */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.field label {
    color: #465166;

    font-size: 0.82rem;
    font-weight: 650;
}


select {
    width: 100%;

    height: 46px;

    padding: 0 42px 0 13px;

    appearance: none;

    border: 1px solid #d8dee8;
    border-radius: 11px;

    background:
        #ffffff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23677386' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 14px center;

    color: #172033;

    font: inherit;
    font-size: 0.92rem;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


select:hover {
    border-color: #b9c3d2;
}


select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


.preset-info {
    margin-top: 15px;

    padding: 13px 14px;

    border-radius: 11px;

    background: #f7f9fc;
}


.preset-info h3 {
    font-size: 0.9rem;
    font-weight: 700;
}


.preset-info p {
    margin-top: 3px;

    color: #6c7789;

    font-size: 0.82rem;
}


/* ============================================================
   CONTROLS
   ============================================================ */

.controls-panel {
    display: flex;
    flex-direction: column;
}


.control {
    margin-bottom: 21px;
}


.control:last-of-type {
    margin-bottom: 18px;
}


.control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 9px;
}


.control-header label {
    color: #354054;

    font-size: 0.87rem;
    font-weight: 650;
}


.control-header output {
    min-width: 55px;

    color: #2563eb;

    font-size: 0.8rem;
    font-weight: 700;

    text-align: right;
}


/* ============================================================
   RANGE INPUTS
   ============================================================ */

input[type="range"] {
    width: 100%;
    height: 5px;

    appearance: none;

    border-radius: 999px;

    background: #dfe5ee;

    cursor: pointer;
}


input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;

    appearance: none;

    border: 3px solid #ffffff;
    border-radius: 50%;

    background: #2563eb;

    box-shadow:
        0 1px 5px rgba(15, 23, 42, 0.25);

    transition:
        transform 0.15s ease;
}


input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}


input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;

    border: 3px solid #ffffff;
    border-radius: 50%;

    background: #2563eb;

    box-shadow:
        0 1px 5px rgba(15, 23, 42, 0.25);

    cursor: pointer;
}


input[type="range"]:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.button {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 16px;

    border: 1px solid transparent;
    border-radius: 11px;

    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.button:hover {
    transform: translateY(-1px);
}


.button:active {
    transform: translateY(0);
}


.button:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.15);
}


.primary-button {
    background: #2563eb;
    color: #ffffff;

    box-shadow:
        0 5px 12px rgba(37, 99, 235, 0.16);
}


.primary-button:hover {
    background: #1d4ed8;
}


.secondary-button {
    background: #f4f6fa;
    color: #354054;

    border-color: #dce2eb;
}


.secondary-button:hover {
    background: #edf1f6;
    border-color: #cbd3df;
}


.download-button {
    width: 100%;

    background: #172033;
    color: #ffffff;

    box-shadow:
        0 5px 12px rgba(15, 23, 42, 0.13);
}


.download-button:hover {
    background: #0f172a;
}


/* ============================================================
   PREVIEW
   ============================================================ */

.preview-panel {
    overflow: hidden;
}


.preview-card {
    min-height: 78px;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 13px;

    border: 1px solid #e2e7ef;
    border-radius: 13px;

    background: #f8fafc;
}


.preview-icon {
    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eaf1ff;
    color: #2563eb;

    font-size: 1.35rem;
    font-weight: 700;
}


.preview-details {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.preview-details strong {
    color: #253047;

    font-size: 0.9rem;
}


.preview-details span {
    margin-top: 2px;

    overflow: hidden;

    color: #778195;

    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.preview-controls {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 13px;
}


/* ============================================================
   DOWNLOAD
   ============================================================ */

.download-info {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 15px;

    padding: 12px;

    border-radius: 12px;

    background: #f7f9fc;
}


.download-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #e9edf4;
    color: #344054;

    font-size: 1.25rem;
    font-weight: 700;
}


.download-info div:last-child {
    display: flex;
    flex-direction: column;
}


.download-info strong {
    font-size: 0.85rem;
}


.download-info span {
    margin-top: 2px;

    color: #788396;

    font-size: 0.77rem;
}


/* ============================================================
   FOOTER
   ============================================================ */

.app-footer {
    padding-top: 25px;

    text-align: center;
}


.app-footer p:first-child {
    color: #687386;

    font-size: 0.78rem;
    font-weight: 650;
}


.app-footer p:last-child {
    margin-top: 3px;

    color: #9aa3b2;

    font-size: 0.72rem;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 560px) {

    .app {
        padding:
            18px
            13px
            30px;
    }


    .panel {
        padding: 18px;
        border-radius: 16px;
    }


    .brand-mark {
        width: 44px;
        height: 44px;

        border-radius: 12px;

        font-size: 21px;
    }


    .brand h1 {
        font-size: 1.15rem;
    }


    .brand p {
        font-size: 0.8rem;
    }


    .preview-controls {
        grid-template-columns: 1fr;
    }


    .button {
        min-height: 46px;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.download-panel {
    overflow: hidden;
}


/* ============================================================
   FORMAT SELECTOR
   ============================================================ */

.format-selector {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-bottom: 15px;
}


.format-option {
    display: block;

    cursor: pointer;
}


.format-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.format-card {
    min-height: 72px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px;

    border: 1px solid #dfe5ee;
    border-radius: 12px;

    background: #f8fafc;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.format-option:hover .format-card {
    border-color: #c8d1df;

    transform: translateY(-1px);
}


.format-option input:checked + .format-card {
    border-color: #2563eb;

    background: #f3f7ff;

    box-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.08);
}


.format-option input:focus-visible + .format-card {
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.15);
}


.format-extension {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #e9edf4;

    color: #344054;

    font-size: 0.7rem;
    font-weight: 800;

    letter-spacing: 0.02em;
}


.format-option input:checked + .format-card .format-extension {
    background: #eaf1ff;

    color: #2563eb;
}


.format-details {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.format-details strong {
    color: #253047;

    font-size: 0.84rem;
}


.format-details span {
    margin-top: 2px;

    color: #788396;

    font-size: 0.74rem;

    line-height: 1.35;
}


/* ============================================================
   DOWNLOAD BUTTON
   ============================================================ */

.download-button {
    width: 100%;

    background: #172033;
    color: #ffffff;

    box-shadow:
        0 5px 12px rgba(15, 23, 42, 0.13);
}


.download-button:hover {
    background: #0f172a;
}