:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-gradient: linear-gradient(135deg, #ff0099, #ff6600);
    --background-light: #f4f6f9;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --white: #ffffff;
    --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: white;
    box-shadow: var(--shadow-subtle);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    height: 50px;
}

.navbar-logo {
    font-size: 1.5em;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
}

.navbar ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
}

.navbar li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    transition: color 0.3s ease;
}

.navbar li a:hover {
    color: #6a11cb;
}

.signup-btn {
    background: var(--secondary-gradient);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.signup-btn:hover {
    transform: translateY(-3px);
}

/* Hero Section */
.hero {
    background-image: url('/assets/images/voice wave.gif');
    color: var(--white);
    text-align: center;
    padding: 80px 20px; /* Reduced padding */
    margin-top: 0;
    position: relative;
    overflow: hidden;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px;
}

.hero h2 {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

.hero .highlight {
    background: var(--secondary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.hero .btn-group button {
    background: var(--secondary-gradient);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hero .btn-group button:hover {
    transform: translateY(-3px);
}

/* Main Container */
.main-container {
    padding: 20px;
}

/* Top Buttons with Gradient */
.top-buttons {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    background: linear-gradient(90deg, #ff6600, #ff0099);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

/* Button Hover Effect */
.btn:hover {
    background: linear-gradient(90deg, #ff0099, #ff6600);
    transform: scale(1.05);
}


/* Translator Content */
.translator-content {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Hidden by default */
.hidden {
    display: none;
}

/* Translator Boxes */
/* Translator Box */
.translator-box {
    background: white;
    border-radius: 20px; /* Adds smooth rounded corners */
    padding: 20px;
    width: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid;
    border-image-source: linear-gradient(90deg, #ff6600, #ff0099);
    border-image-slice: 1;
}

/* Language Selection Dropdown */
.lang-selection {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 20px;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
}

/* Language Dropdown Styling */
select {
    width: 45%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    appearance: none; /* Removes default arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Hover Effect */
select:hover {
    background: #fff;
}

/* Focus Effect */
select:focus {
    outline: none;
    border-color:  #0c021e;
    background: #fff;
    transform: scale(1.02);
}

/* Disabled Dropdown */
select:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Dropdown Options */
option {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: black;
}

/* Swap Button Styling */
.swap-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);;
    color: white;
    border: none;
    border-radius: 50%; /* Circular button */
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Hover Effect for Swap Button */
.swap-btn:hover {
    transform: scale(1.1);
}

/* Translation Area */
.translation-area {
    display: flex;
    gap: 20px;
    
}

/* Text Area Styling */
textarea {
    width: 100%;
    height: 250px;
    padding: 12px;
    border-radius: 10px; /* Rounded corners for textarea */
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    color: #333;
    resize: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Focus Effect */
textarea:focus {
    border: 1px solid;
    border-color:  #0c021e;
    background: #fff;
    outline: none;
    box-shadow: 0 10px 15px rgba(207, 5, 126, 0.144);
    transform: scale(1.02);
}

/* Add subtle glow to textarea */
textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

/* Disabled Text Area */
textarea:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Style for the translate button */
.translate-btn-1 {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

/* Hover effect for translate button */
.translate-btn-1:hover {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    transform: scale(1.05);
}

/* Style for the clear button */
.clr-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

/* Hover effect for clear button */
.clr-btn:hover {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    transform: scale(1.05);
}

.btn-container {
    display: flex;
    justify-content: flex-start; /* Keeps buttons aligned to the left */
    gap: 10px; /* Space between buttons */
    position: relative;
    margin-top: 10px;
}

/* Style for the copy button to move it to the top right */
.copy-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 0.7;
}


/* Audio Player */
audio {
    width: 100%;
    margin-top: 10px;
}

.hidden {
    display: none;
}

/* Center the document translator box */
#doc-container {
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    width: 50%;
    border: 2px solid; /* Border width */
    border-image: linear-gradient(90deg, #ff6600, #ff0099) 1;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Title */
.doc-title {
    font-size: 24px;
    margin-top: 0%;
    margin-bottom: 0px;
    text-align: center;
    background:linear-gradient(135deg, #441a7e, #0c021e);
    background-clip: text;
    -webkit-background-clip: text; /* For Webkit browsers */
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for non-compatible browsers */
}

/* Upload box styling */
.upload-box {
    width: 40%;
    height: 100px;
    border: 1px dashed linear-gradient(135deg, #441a7e, #0c021e);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
    text-align: center;
}

.upload-box p {
    font-size: 16px;
    color: #333;
}

/* Style for Upload File Link */
#uploadLink {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none; /* Removes underline */
    display: inline-block;
    background: linear-gradient(135deg, #441a7e, #0c021e);
    background-clip: text; /* Standard property for modern browsers */
    -webkit-background-clip: text; /* For Webkit browsers */
    -moz-background-clip: text; /* For Mozilla browsers */
    -ms-background-clip: text; /* For IE/Edge (just in case) */
    -o-background-clip: text; /* For Opera */
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for non-compatible browsers */
    transition: transform 0.2s ease-in-out;
}

/* Optional Hover Effect */
#uploadLink:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    text-decoration: underline; /* Add underline on hover */
}

/* Language selection container */
.lang-selection-2 ,.lang-selection-3 {
    display: flex;
    align-items: center;
    gap: 15px; /* Add space between elements */
    margin-top: 10px;
    justify-content: center;
}

/* Style for source and target language dropdowns */
#sourceLang-2, #targetLang-2 ,#sourceLang-3, #targetLang-3  {
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Swap button styling */
.swap-btn-2 {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

/* Swap button hover effect */
.swap-btn-2:hover {
    background: linear-gradient(135deg, #0c021e, #441a7e);
    transform: scale(1.1);
}


/* File preview section */
.file-preview {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    width: 50%;
    height: auto;
    text-align: center;

    /* Centering Horizontally and Vertically */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}


/* Textarea output */
#docOutput {
    width: 95%;
    height: 200px;
    margin-top: 20px;
    margin-left: 10px;
    margin-right: 10px;
    padding: 50px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

/* Button Container for Alignment */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between buttons */
    margin-top: 20px;
}

/* Translate Button */
.translate-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

/* Download Button */
.download-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

/* Button Hover Effects */
.translate-btn:hover, .download-btn:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    background: linear-gradient(135deg, #441a7e, #0c021e);
}

.clr-btn-2 {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

/* Hover effect for clear button */
.clr-btn-2:hover {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    transform: scale(1.05);
}


.upload-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.hidden {
    display: none;
}

/* Progress Container */
.progress-container {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.progress-bar {
    width: 100%;
    background-color: #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
    height: 20px;
    margin-top: 10px;
}

.progress {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #ff0099, #ff6600);
    transition: width 0.3s ease;
}

#progressText {
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
}

/* Button Container for Alignment */
.audio-button-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between buttons */
    margin-top: 20px;
}

/* Translate Button */
.audio-translate-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

/* Download Button */
.audio-download-btn {
    background: linear-gradient(135deg, #441a7e, #0c021e);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}


#uploadAudioLink{
    font-size: 18px;
    font-weight: bold;
    text-decoration: none; /* Removes underline */
    display: inline-block;
    background: linear-gradient(135deg, #441a7e, #0c021e);
    background-clip: text; /* Standard property for modern browsers */
    -webkit-background-clip: text; /* For Webkit browsers */
    -moz-background-clip: text; /* For Mozilla browsers */
    -ms-background-clip: text; /* For IE/Edge (just in case) */
    -o-background-clip: text; /* For Opera */
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for non-compatible browsers */
    transition: transform 0.2s ease-in-out;
}

/* Optional Hover Effect */
#uploadAudioLink:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    text-decoration: underline; /* Add underline on hover */
}

#audioOutput {
    width: 95%;
    height: 200px;
    margin-top: 20px;
    margin-left: 10px;
    margin-right: 10px;
    padding: 50px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

footer {
    text-align: center;
    padding: 2px;
    background-color: black;
    color: white; /* White text in the footer */
    margin-top: 10px;
}

footer p {
    margin: 10px 0;
    color: white; /* Footer paragraph stays white */
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Loading Content Box */
.loading-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* AI Icon Styling */
.ai-icon svg {
    width: 40px;
    height: 40px;
    fill:#ff7e5f;
    margin-bottom: 10px;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff7e5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.loading-text {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

/* Loading Subtext */
.loading-subtext {
    font-size: 14px;
    color: #666;
}
