projekt-7/Script_Speech_recognition/style.css

292 lines
6.1 KiB
CSS
Raw Normal View History

2024-11-02 19:14:00 +00:00
/* Default Light Theme */
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
color: #333;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
color: #4285f4;
font-size: 28px;
2024-11-02 19:14:00 +00:00
margin-top: 20px;
}
.container {
display: flex;
justify-content: center; /* Center the elements horizontally */
align-items: flex-start; /* Align items to the top */
2024-11-04 21:12:07 +00:00
padding: 20px;
gap: 20px; /* Maintain a comfortable space between elements */
flex-wrap: wrap; /* Allow wrapping for responsive layouts */
max-width: 1200px; /* Set max-width to keep layout centered and compact */
margin: 0 auto; /* Center the container itself */
}
.textarea-container,
.video {
width: 45%;
max-width: 500px;
min-width: 300px; /* Minimum width for smaller screens */
}
.translation-buttons {
display: flex;
justify-content: center; /* Center buttons */
gap: 10px;
margin-bottom: 20px;
}
.translation-buttons button {
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-02 19:14:00 +00:00
}
.translation-buttons button:hover {
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);
}
.textarea-container {
position: relative;
}
2024-11-02 19:14:00 +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
}
#timerDisplay, #statusText {
text-align: center;
font-size: 18px;
color: #555;
}
#statusText {
color: #f44336;
}
/* Style for buttons */
button {
padding: 10px 20px;
font-size: 16px;
background-color: #4285f4;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
border-radius: 5px;
}
button:hover {
background-color: #357ae8;
}
button.dark-mode {
background-color: #333;
color: #fff;
}
/* Dark Mode */
2024-11-02 19:14:00 +00:00
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 {
background-color: #8ab4f8;
color: #121212;
}
#startBtn.dark-mode:hover {
background-color: #76a7f3;
}
#timerDisplay.dark-mode, #statusText.dark-mode {
color: #b0b0b0;
}
#statusText.dark-mode {
color: #cf6679;
}
2024-11-04 21:12:07 +00:00
.video.dark-mode {
background-color: #1e1e1e; /* Dark background for video container */
border: 2px solid #333; /* Dark border */
}
.video.dark-mode video {
background-color: #1e1e1e; /* Dark background for video */
}
2024-11-02 19:14:00 +00:00
.video {
position: relative;
max-height: 700px; /* Set a reasonable maximum height */
aspect-ratio: 16/9; /* Keep a responsive aspect ratio for the video */
2024-11-04 21:12:07 +00:00
background-color: #ffffff;
border: 12px solid #d4d4d4;
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;
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-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%;
max-height: 150%; /* Ensure the video fits within the container */
2024-11-02 19:14:00 +00:00
border-radius: 4px;
object-fit: cover; /* Ensure the video fits its container */
2024-11-02 19:14:00 +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%;
width: 40px;
height: 40px;
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);
transition: background-color 0.3s ease, transform 0.2s;
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;
transform: scale(1.1);
2024-11-04 21:12:07 +00:00
}
2024-11-02 19:14:00 +00:00
#prevBtn {
2024-11-04 21:12:07 +00:00
left: -20px;
2024-11-02 19:14:00 +00:00
}
#nextBtn {
2024-11-04 21:12:07 +00:00
right: -20px;
2024-11-02 19:14:00 +00:00
}
/* Style for the start button */
#startBtn {
position: absolute;
left: 10px; /* Position it to the left inside the container */
bottom: 10px; /* Place it at the bottom */
padding: 10px;
font-size: 24px;
background-color: #4285f4;
color: white;
border: none;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.3s ease;
}
/* Hover effect for start button */
#startBtn:hover {
background-color: #357ae8;
}
/* Style for the translate button */
#translateBtn {
position: absolute;
right: 10px; /* Position it to the right inside the container */
bottom: 10px; /* Place it at the bottom */
padding: 10px 20px;
2024-11-04 21:12:07 +00:00
font-size: 16px;
background-color: #4285f4;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
/* Hover effect for translate button */
#translateBtn:hover {
background-color: #357ae8;
}
/* 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;
2024-11-04 21:12:07 +00:00
}
#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 */
margin: 0;
2024-11-04 21:12:07 +00:00
}
/* Responsive layout adjustments */
2024-11-04 21:12:07 +00:00
@media (max-width: 768px) {
.container {
flex-direction: column;
align-items: center;
2024-11-04 21:12:07 +00:00
}
.textarea-container,
.video {
width: 90%; /* Expand to take more space on smaller screens */
max-width: none;
2024-11-04 21:12:07 +00:00
}
2024-10-21 10:04:57 +00:00
}