body {
    font-family: sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content area that centers the container */
.main-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.container {
    --control-height: 44px;
    background-color: rgba(255, 255, 255, 0.35);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90vw;
    /* Prevents container from getting too wide on large screens */
    width: 385px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Logo and Name Styling */
.logo-name {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-left: -9px;
}

.logo-name img {
    height: 50px;
    margin-right: 15px;
}

h1 {
    font-family: 'Impact', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    color: black;
    transform: scaleY(0.9);
}

/* URL input + upload button row */
.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.input-row input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
    height: var(--control-height);
}

.input-row #uploadButton {
    flex: 0 0 auto;
    width: var(--control-height);
    height: var(--control-height);
    padding: 0;
    margin: 0;
    line-height: 1;
    box-sizing: border-box;
    border: 1px solid transparent; /* match input's border height without showing it */
    background-color: #e6f0ff; /* light blue */
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-row #uploadButton:hover { background-color: #d8eaff; }
.input-row #uploadButton:active { background-color: #cfe3ff; }
.input-row #uploadButton svg { width: 20px; height: 20px; display: block; }

input[type="text"] {
    width: calc(100% - 4px);
    padding: 12px 14px;
    margin: 0 2px 15px 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    height: var(--control-height);
}

/* Uploaded file display */
.uploaded-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.uploaded-file .file-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.uploaded-file .file-name {
    flex: 1;
    text-align: left;
    color: #495057;
}

.uploaded-file .remove-file {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.uploaded-file .remove-file:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Dropdown container - initially hidden */
.dropdown-container {
    display: none;
    /* Hidden by default */
    gap: 10px;
    margin-bottom: 15px;
}

.dropdown-container.show {
    display: flex;
    /* Show when 'show' class is added */
}

select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    background: white;
}

/* Flex gap fallbacks for older Safari */
@supports not (gap: 8px) {
    .input-row { gap: 0; }
    .input-row > * + * { margin-left: 8px; }
    .dropdown-container { gap: 0; }
    .dropdown-container > * + * { margin-left: 10px; }
}

/* Labels for dropdowns */
select:first-child::before {
    content: "Source Language";
}

select:last-child::before {
    content: "Target Language";
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 3px 0 17px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

video {
    width: 100%;
    height: auto;
    display: none;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .container {
        width: 90%;
        padding: 20px;
    }

    .dropdown-container {
        flex-direction: column;
        gap: 10px;
    }
}