2024-11-02 19:14:00 +00:00
|
|
|
|
/* Default Light Theme */
|
2024-11-18 18:40:04 +00:00
|
|
|
|
html, body {
|
|
|
|
|
height: 100%; /* Ensure that the HTML and body elements span the full height of the viewport */
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow-x: hidden; /* Prevent horizontal scrolling but allow vertical scrolling */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
font-family: Arial, sans-serif;
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
color: #333;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
box-sizing: border-box; /* Make sure padding and borders are included in width/height */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #4285f4;
|
2024-11-14 16:09:05 +00:00
|
|
|
|
font-size: 28px;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
margin: 20px 0;
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
/* Full-width container taking half the height of the page */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
.container {
|
|
|
|
|
display: flex;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
justify-content: center; /* Center the elements horizontally */
|
2024-11-18 18:40:04 +00:00
|
|
|
|
align-items: center; /* Center items vertically */
|
|
|
|
|
width: 100%; /* Full width of the page */
|
|
|
|
|
padding: 20px; /* Add some padding for spacing */
|
2024-11-18 12:40:06 +00:00
|
|
|
|
gap: 20px; /* Maintain a comfortable space between elements */
|
2024-11-14 16:09:05 +00:00
|
|
|
|
flex-wrap: wrap; /* Allow wrapping for responsive layouts */
|
2024-11-18 18:40:04 +00:00
|
|
|
|
box-sizing: border-box; /* Include padding in width calculation */
|
2024-11-18 12:40:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
.textarea-container {
|
|
|
|
|
position: relative; /* Needed for absolute positioning of child elements */
|
2024-11-18 12:40:06 +00:00
|
|
|
|
width: 45%;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
max-width: 600px;
|
|
|
|
|
min-width: 350px;
|
2024-11-19 16:39:40 +00:00
|
|
|
|
box-sizing: border-box; /* Include padding and borders in the element’s dimensions */
|
2024-11-14 16:09:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
/* Styling for the buttons above the textarea */
|
2024-11-14 16:09:05 +00:00
|
|
|
|
.translation-buttons {
|
|
|
|
|
display: flex;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
justify-content: center; /* Center the buttons horizontally */
|
|
|
|
|
gap: 10px; /* Space between the buttons */
|
|
|
|
|
margin-bottom: 15px; /* Space between buttons and textarea */
|
2024-11-14 16:09:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
#translateWordsBtn, #translateLettersBtn {
|
2024-11-14 16:09:05 +00:00
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
background-color: #4285f4;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background-color 0.3s ease;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); /* Added shadow for consistency */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
#translateWordsBtn:hover, #translateLettersBtn:hover {
|
2024-11-14 16:09:05 +00:00
|
|
|
|
background-color: #357ae8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Active button style */
|
|
|
|
|
.translation-buttons .active {
|
|
|
|
|
background-color: #357ae8;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 12:40:06 +00:00
|
|
|
|
#inputText {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 200px;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
background-color: #f9f9f9;
|
|
|
|
|
border: 2px solid #e0e0e0;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
color: #333;
|
|
|
|
|
resize: none; /* Disable resizing */
|
|
|
|
|
box-sizing: border-box; /* Ensure padding doesn't affect the width */
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
2024-11-18 18:40:04 +00:00
|
|
|
|
position: relative; /* Needed for buttons inside the textarea container */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
/* Microphone button inside textarea, positioned bottom-left */
|
|
|
|
|
#startBtn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 10px;
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
font-size: 20px;
|
2024-11-14 16:09:05 +00:00
|
|
|
|
background-color: #4285f4;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
border-radius: 50%;
|
2024-11-14 16:09:05 +00:00
|
|
|
|
cursor: pointer;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
transition: background-color 0.3s ease;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
z-index: 5;
|
2024-11-14 16:09:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-19 17:35:48 +00:00
|
|
|
|
.translation-buttons button:hover {
|
2024-11-14 16:09:05 +00:00
|
|
|
|
background-color: #357ae8;
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-19 17:35:48 +00:00
|
|
|
|
/* Active button style */
|
|
|
|
|
.translation-buttons .active {
|
|
|
|
|
background-color: #357ae8;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-19 17:35:48 +00:00
|
|
|
|
.textarea-container {
|
|
|
|
|
position: relative;
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-19 17:35:48 +00:00
|
|
|
|
#inputText {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 200px;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
background-color: #f9f9f9;
|
|
|
|
|
border: 2px solid #e0e0e0;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
color: #333;
|
|
|
|
|
resize: none; /* Disable resizing */
|
|
|
|
|
box-sizing: border-box; /* Ensure padding doesn't affect the width */
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
/* Translate button inside textarea, positioned bottom-right, increased size by half */
|
|
|
|
|
#translateBtn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 10px;
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
padding: 12px 25px; /* Increased padding to make button larger */
|
|
|
|
|
font-size: 18px; /* Increased font size */
|
|
|
|
|
background-color: #4285f4;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background-color 0.3s ease;
|
|
|
|
|
z-index: 5;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
#translateBtn:hover {
|
|
|
|
|
background-color: #357ae8;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-02 19:14:00 +00:00
|
|
|
|
.video {
|
|
|
|
|
position: relative;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
width: 45%;
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
min-width: 350px;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
aspect-ratio: 16/9; /* Keep a responsive aspect ratio for the video */
|
2024-11-04 21:12:07 +00:00
|
|
|
|
background-color: #ffffff;
|
2024-11-18 17:43:42 +00:00
|
|
|
|
border: 12px solid #d4d4d4;
|
2024-11-14 16:09:05 +00:00
|
|
|
|
border-radius: 12px;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
2024-11-02 19:14:00 +00:00
|
|
|
|
display: flex;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-start;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
transition: transform 0.3s ease;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
box-sizing: border-box;
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-04 21:12:07 +00:00
|
|
|
|
/* Styling for video element inside .video */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
.video video {
|
2024-11-04 21:12:07 +00:00
|
|
|
|
width: 100%;
|
2024-11-18 17:43:42 +00:00
|
|
|
|
max-height: 150%; /* Ensure the video fits within the container */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
border-radius: 4px;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
object-fit: cover; /* Ensure the video fits its container */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 12:40:06 +00:00
|
|
|
|
/* Navigation button styles */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
#prevBtn, #nextBtn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
background-color: #4285f4;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 50%;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
width: 50px; /* Increase button size */
|
|
|
|
|
height: 50px; /* Increase button size */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
|
2024-11-18 17:56:56 +00:00
|
|
|
|
transition: background-color 0.3s ease;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
z-index: 10; /* Ensure buttons are above other elements */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-04 21:12:07 +00:00
|
|
|
|
#prevBtn:hover, #nextBtn:hover {
|
|
|
|
|
background-color: #357ae8;
|
|
|
|
|
}
|
2024-11-02 19:14:00 +00:00
|
|
|
|
|
|
|
|
|
#prevBtn {
|
2024-11-18 17:56:56 +00:00
|
|
|
|
left: -30px; /* Adjust button position for better appearance */
|
2024-11-02 19:14:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#nextBtn {
|
2024-11-18 17:56:56 +00:00
|
|
|
|
right: -30px; /* Adjust button position for better appearance */
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 12:40:06 +00:00
|
|
|
|
/* Style for the theme toggle button (icon) */
|
|
|
|
|
#themeToggleBtn {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 20px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
border: none;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
z-index: 1000; /* Ensure it stays on top */
|
|
|
|
|
transition: color 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#themeToggleBtn:hover {
|
|
|
|
|
color: #f4b400; /* Add a hover color effect */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.video h2 {
|
|
|
|
|
color: #4285f4; /* Heading color */
|
|
|
|
|
font-size: 24px; /* Font size for the heading */
|
|
|
|
|
text-align: center; /* Center align the text */
|
2024-11-18 17:43:42 +00:00
|
|
|
|
margin: 0;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 18:40:04 +00:00
|
|
|
|
/* Dark Mode */
|
|
|
|
|
body.dark-mode {
|
|
|
|
|
background-color: #121212;
|
|
|
|
|
color: #e0e0e0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1.dark-mode {
|
|
|
|
|
color: #8ab4f8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textarea.dark-mode {
|
|
|
|
|
background-color: #1e1e1e;
|
|
|
|
|
border-color: #333;
|
|
|
|
|
color: #e0e0e0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textarea.dark-mode:focus {
|
|
|
|
|
border-color: #8ab4f8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#startBtn.dark-mode,
|
|
|
|
|
#translateBtn.dark-mode,
|
|
|
|
|
#translateWordsBtn.dark-mode,
|
|
|
|
|
#translateLettersBtn.dark-mode,
|
|
|
|
|
#prevBtn.dark-mode,
|
|
|
|
|
#nextBtn.dark-mode {
|
|
|
|
|
background-color: #333;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#startBtn.dark-mode:hover,
|
|
|
|
|
#translateBtn.dark-mode:hover,
|
|
|
|
|
#translateWordsBtn.dark-mode:hover,
|
|
|
|
|
#translateLettersBtn.dark-mode:hover,
|
|
|
|
|
#prevBtn.dark-mode:hover,
|
|
|
|
|
#nextBtn.dark-mode:hover {
|
|
|
|
|
background-color: #555;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.video.dark-mode {
|
|
|
|
|
background-color: #1e1e1e;
|
|
|
|
|
border-color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#themeToggleBtn.dark-mode {
|
|
|
|
|
color: #e0e0e0;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 12:40:06 +00:00
|
|
|
|
/* Responsive layout adjustments */
|
2024-11-04 21:12:07 +00:00
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.container {
|
2024-11-14 16:09:05 +00:00
|
|
|
|
flex-direction: column;
|
2024-11-18 12:40:06 +00:00
|
|
|
|
align-items: center;
|
2024-11-18 18:40:04 +00:00
|
|
|
|
padding: 20px; /* Add padding for spacing on smaller screens */
|
|
|
|
|
gap: 15px; /* Reduce gap for smaller screens */
|
|
|
|
|
height: auto; /* Allow the height to adjust for mobile screens */
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
2024-11-14 16:09:05 +00:00
|
|
|
|
|
|
|
|
|
.textarea-container,
|
|
|
|
|
.video {
|
2024-11-18 18:40:04 +00:00
|
|
|
|
width: 100%; /* Full width for smaller screens */
|
2024-11-18 12:40:06 +00:00
|
|
|
|
max-width: none;
|
2024-11-04 21:12:07 +00:00
|
|
|
|
}
|
2024-11-18 18:40:04 +00:00
|
|
|
|
|
|
|
|
|
#translateWordsBtn, #translateLettersBtn {
|
|
|
|
|
font-size: 14px; /* Reduce button font size for smaller screens */
|
|
|
|
|
padding: 8px 15px; /* Reduce button padding for smaller screens */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#inputText {
|
|
|
|
|
height: 150px; /* Reduce height for the text area */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#startBtn, #translateBtn {
|
|
|
|
|
font-size: 16px; /* Reduce button font size for smaller screens */
|
|
|
|
|
padding: 10px; /* Reduce button padding */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#prevBtn, #nextBtn {
|
|
|
|
|
width: 40px; /* Reduce button size for smaller screens */
|
|
|
|
|
height: 40px; /* Reduce button size for smaller screens */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#prevBtn {
|
|
|
|
|
left: -20px; /* Adjust button position for smaller screens */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#nextBtn {
|
|
|
|
|
right: -20px; /* Adjust button position for smaller screens */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 24px; /* Decrease heading font size for mobile devices */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#themeToggleBtn {
|
|
|
|
|
font-size: 20px; /* Decrease theme toggle button size for mobile */
|
|
|
|
|
}
|
2024-10-21 10:04:57 +00:00
|
|
|
|
}
|