/* ===========================
   VTRANS 2.0
   Google Translate Inspired UI
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter',sans-serif;
}

body{
    background:#f8f9fa;
    color:#202124;
    min-height:100vh;
}

/* ===========================
Header
=========================== */

.head{
    display: flex;
    padding: 0.75rem 1rem;
    align-items: center;
    background-color:#1010108a;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    justify-content: space-between;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    min-height: var(--header-h);
}
.head-left{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.head-left img:first-child{ height: 60px; width: 100px; }
.head-left img:last-child{ height: 40px; width: 180px; }

.head button{
    padding: 10px 28px;
    text-decoration: none;
    color: white;
    background-color:#F85809;
    border-radius: 40px;
    border: 0;
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 1.05rem);
    font-family:'Lexend Zetta', sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

/* ===== Nav ===== */
.nav-menu{
    padding: 10px 8px;
    background-color:#15e9cd73;
    color: black;
    align-items: center;
    text-decoration: none;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    border-radius: 60px;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    position: fixed;
    top: calc(var(--header-h) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: min(90vw, 640px);
}
.nav-menu li{
    list-style: none;
    text-align: center;
    padding: 5px 16px;
}
.nav-items a{
    display: flex;
    color: black;
    text-decoration: none;
    font-family: 'Montserrat Alternates';
    font-weight: 400;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    white-space: nowrap;
}

/* ===== Overlay / login form ===== */
#overlay{
    position: fixed;
    display: none;
    background-color: rgba(0, 0, 0, 0.55);
    inset: 0;
    z-index: 100;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
}
.login-form{
    font-family: 'Prompt';
    position: absolute;
    background-color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: min(450px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 28px;
    box-shadow: 2px 2px 5px 5px rgba(0, 0, 0, 0.20);
    border-radius: 16px;
    cursor: default;
}
.login-form h2{
    text-align: center;
    color: #222;
    margin: 10px 0 20px;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
}
.underline{
    background-color: #F85809;
    padding: 2px;
    margin: 0 40px;
}
.login-form .element{ margin: 18px 0; }
.login-form .element label{ font-size: 16px; color: #222; }
.element input[type="text"],.element input[type="password"]{
    font-size: 16px;
    margin: 5px 0 0;
    display: block;
    width: 100%;
    padding: 14px;
    outline: none;
    border: none;
    border-bottom: 2px solid #4a4949c3;
}
.element input[type="checkbox"]{ margin-right: 8px; }
.login-form .element button{
    width: 100%;
    height: 50px;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #f85909;
    color: white;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 10px;
    cursor: pointer;
}
.login-form .element a{
    display: block;
    text-align: center;
    font-size: 16px;
    color: rgb(2, 144, 205);
}
/* ===========================
Translator Container
=========================== */

.translator-container{
    max-width:1250px;
    margin:auto;
    padding:40px 20px;
}

.translator-header{
    text-align:center;
    margin-bottom:40px;
}

.translator-header h1{
    font-size:42px;
    font-weight:700;
    color:#202124;
    margin-bottom:12px;
}

.translator-header p{
    color:#5f6368;
    font-size:18px;
}

/* ===========================
Language Bar
=========================== */

.language-bar{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:25px;
    margin-bottom:35px;
}

.language-card{
    width:280px;
    background:#fff;
    border-radius:16px;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    padding:18px;
}

.language-card label{
    display:block;
    color:#5f6368;
    margin-bottom:8px;
    font-size:14px;
}

.language-card select{
    width:100%;
    border:none;
    outline:none;
    font-size:18px;
    background:none;
    color:#202124;
    cursor:pointer;
}

.swap-btn{
    width:60px;
    height:60px;
    border:none;
    border-radius:50%;
    background:#1a73e8;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 10px 25px rgba(26,115,232,.3);
}

.swap-btn:hover{
    transform:rotate(180deg);
}

/* ===========================
Translation Area
=========================== */

.translation-wrapper{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
}

.translation-card{
    background:#fff;
    border-radius:20px;
    box-shadow:0 8px 30px rgba(0,0,0,.08);
    overflow:hidden;
    min-height:380px;
}

.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 24px;
    border-bottom:1px solid #ececec;
    font-weight:600;
    font-size:18px;
}

.card-body{
    padding:30px;
    min-height:220px;
}

.card-body p{
    font-size:22px;
    line-height:1.8;
    color:#202124;
}

.card-footer{
    padding:25px;
}

/* ===========================
Primary Button
=========================== */

.primary-btn{
    width:100%;
    height:60px;
    border:none;
    border-radius:16px;
    background:#1a73e8;
    color:#fff;
    font-size:18px;
    font-weight:600;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 12px 25px rgba(26,115,232,.25);
}

.primary-btn:hover{
    background:#1558d6;
    transform:translateY(-3px);
}

.primary-btn:active{
    transform:scale(.98);
}

.primary-btn .material-symbols-outlined{
    font-size:30px;
}

/* ===========================
Action Buttons
=========================== */

.actions{
    display:flex;
    gap:12px;
}

.icon-btn{
    width:44px;
    height:44px;
    border:none;
    border-radius:12px;
    background:#f1f3f4;
    cursor:pointer;
    transition:.3s;
    display:flex;
    justify-content:center;
    align-items:center;
}

.icon-btn:hover{
    background:#1a73e8;
    color:#fff;
}

.icon-btn span{
    font-size:22px;
}

/* ===========================
Audio
=========================== */

.audio-section{
    margin-top:30px;
}

.audio-section audio{
    width:100%;
    border-radius:14px;
}

/* ===========================
Status
=========================== */

.status-area{
    margin-top:35px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
}

#status-text{
    color:#5f6368;
    font-size:16px;
}

.pulse-circle{
    width:16px;
    height:16px;
    border-radius:50%;
    background:#1a73e8;
    animation:pulse 1.5s infinite;
}

@keyframes pulse{

    0%{
        transform:scale(.8);
        opacity:1;
    }

    70%{
        transform:scale(2.2);
        opacity:0;
    }

    100%{
        opacity:0;
    }

}

/* ===========================
Footer
=========================== */

footer{
    text-align:center;
    padding:40px 20px;
    color:#5f6368;
    font-size:15px;
}

/* ===========================
Overlay Login
=========================== */

#overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    z-index:999;
    justify-content:center;
    align-items:center;
}

.login-form{
    width:380px;
    background:#fff;
    padding:35px;
    border-radius:20px;
    box-shadow:0 20px 60px rgba(0,0,0,.2);
}

.login-form h2{
    text-align:center;
    margin-bottom:20px;
}

.underline{
    width:70px;
    height:4px;
    background:#1a73e8;
    margin:0 auto 30px;
    border-radius:20px;
}

.element{
    margin-bottom:20px;
}

.element label{
    display:block;
    margin-bottom:8px;
    font-weight:500;
}

.element input{
    width:100%;
    height:48px;
    border:1px solid #dadce0;
    border-radius:12px;
    padding:0 15px;
    outline:none;
}

.element input:focus{
    border-color:#1a73e8;
}

.remember{
    display:flex;
    align-items:center;
    gap:10px;
}

.remember input{
    width:auto;
    height:auto;
}

.element button{
    width:100%;
    height:52px;
    border:none;
    border-radius:12px;
    background:#1a73e8;
    color:#fff;
    cursor:pointer;
    font-size:16px;
    transition:.3s;
}

.element button:hover{
    background:#1558d6;
}

.element a{
    display:block;
    text-align:center;
    text-decoration:none;
    color:#1a73e8;
}

/* ===========================
Responsive
=========================== */

@media(max-width:992px){

    .translation-wrapper{
        grid-template-columns:1fr;
    }

    .language-bar{
        flex-direction:column;
    }

    .swap-btn{
        transform:rotate(90deg);
    }

}

@media(max-width:768px){

    .topbar{
        padding:20px;
        height:auto;
    }

    .translator-header h1{
        font-size:30px;
    }

    .translator-header p{
        font-size:15px;
    }

    .language-card{
        width:100%;
    }

    .card-body p{
        font-size:18px;
    }

    .login-form{
        width:92%;
    }

}