﻿body {
    padding:0!important;
}
.header {
    padding-top: 15px;
    padding-right: 15px;
    padding-left: 15px;
}
h2 {
    color:#ffffff;
}
.container-audio {
    max-width: 1000px;
    margin: 0 auto;
    padding-right: 20px;
    padding-left: 20px;
}
.container-translation {
    max-width: 1000px;
    margin: 0 auto;
    padding-right: 20px;
    padding-left: 20px;
}
.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    /*background: #0063e0;*/
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    /*flex-wrap: wrap;*/
}

.control-group {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.select-wrapper {
    position: relative;
    width: 220px;
}

.select-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    pointer-events: none;
}
.select-wrapper select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    background: #0063e0;
    color: #ffffff;
    padding: 10px 12px 10px 30px; /* spazio per l’icona */
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/*.arrow {
    font-size: 24px;
    text-align: center;
    display: none;
}*/

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 25px;
}

.btn {
    width: 100%;
    max-width: 300px;
    padding: 16px 30px;
    border: none;
    /*border-radius: 50px;*/
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:active {
    transform: scale(0.98);
}

.btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}
.btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
#status {
    font-style: italic;
    color: #eaff5f;
    font-size: 1em;
    text-align: center;
    font-weight: 500;
    margin-bottom: 10px;
}
.statusError {
    font-style: italic;
    color: #eaff5f;
    font-size: 1em;
    text-align: center;
    font-weight: 500;
    margin-bottom: 10px;
    text-decoration:none;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.text-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95em;
    padding-left: 5px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    resize: none;
    line-height: 1.6;
    font-family: inherit;
    transition: border-color 0.3s;
}

    textarea:focus {
        outline: none;
        border-color: #667eea;
    }

#it-area {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    max-height: 12vh;
    /*padding: 15px;*/
    font-size: 16px;
    box-sizing: border-box;
    background: transparent;
    color: #ffffff;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

#it-area::-webkit-scrollbar {
  width: 6px;
}

#en-area {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    max-height: 15vh;
    padding: 15px;
    font-size: 16px;
    box-sizing: border-box;
    background: rgb(255, 255, 255, 0.1);
    color: #ffffff;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    /*border: 2px solid #6d9ce2;*/
    border-radius: 8px;
    display:none;
}

#en-area::-webkit-scrollbar {
    width: 6px;
}

#visualizer {
    width: 100%;
    height: 30px;
    background: #0064e100;
}

#downloadTranslate {
    display: none;
    color: #ffffff;
    text-decoration: none;
}

#downloadTranscription {
    display: none;
    color: #ffffff;
    text-decoration: none;
}

#downloadAudio {
    display: none;
    color: #ffffff;
    text-decoration: none;
}
#translationDetail {
    display: none;
    color: #eaff5f;
    text-decoration: none;
}
#container-download {
    display: none;
    width: 100%;
    margin-top: 25px;
    border-radius: 8px;
    text-align:center;
}
.icon-download {
    font-size: 20px;
}
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color:#ffffff;
}

.custom-checkbox input:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.custom-checkbox input:checked + .checkmark::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.custom-checkbox.disabled .checkmark {
    border-color: #aaa;
    background-color: transparent;
}

.custom-checkbox.disabled input {
    pointer-events: none;
}
.standby-visualizer {
    position: relative;
    width: 100%;
    height: 160px;
    background: #0b0f1a;
    overflow: hidden;
    background: repeating-linear-gradient( to right, #1b71e1 0 6px, transparent 8px 9px);
    /* Simmetria verticale */
    mask-image: linear-gradient(to bottom, black 50%, black 50%, black 50%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, black 50%, black 50%);
    /* Animazione pseudo-random combinata */
    animation: jitter 8s steps(12, end) infinite, jitter2 6.2s steps(10, end) infinite;
    transform-origin: center;
    will-change: transform;
}

/* Keyframes pseudo-random 1 */
@keyframes jitter {
    0% {
        transform: scaleY(.4);
    }

    8% {
        transform: scaleY(.9);
    }

    17% {
        transform: scaleY(.5);
    }

    25% {
        transform: scaleY(1.2);
    }

    33% {
        transform: scaleY(.6);
    }

    42% {
        transform: scaleY(1.0);
    }

    50% {
        transform: scaleY(.7);
    }

    58% {
        transform: scaleY(1.2);
    }

    67% {
        transform: scaleY(.5);
    }

    75% {
        transform: scaleY(1.1);
    }

    83% {
        transform: scaleY(.6);
    }

    92% {
        transform: scaleY(1.0);
    }

    100% {
        transform: scaleY(.4);
    }
}

/* Keyframes pseudo-random 2 (indipendente) */
@keyframes jitter2 {
    0% {
        transform: scaleY(.5);
    }

    14% {
        transform: scaleY(.8);
    }

    28% {
        transform: scaleY(.6);
    }

    42% {
        transform: scaleY(1.1);
    }

    56% {
        transform: scaleY(.7);
    }

    70% {
        transform: scaleY(1.2);
    }

    84% {
        transform: scaleY(.5);
    }

    100% {
        transform: scaleY(.6);
    }
}

.visualizer-disabled {
    height: 25px !important;
}

.visualizer-enabled {
    height: 160px !important;
}

.standby-visualizer-enabled {
    height: 160px;
}

.standby-visualizer-disabled {
    height: 0px;
}

.container-visualizer {
    margin-top: 15px;
}
@media (pointer: coarse) {
    .checkmark {
        width: 22px;
        height: 22px;
    }
}