AKIRA
Finalize all local changes
b3b0b53
raw
history blame
3.09 kB
/* wechat-miniprogram-translator/index.wxss */
:root {
--background-color: #f0f2f5;
--card-bg: #ffffff;
--primary-text: #1c1e21;
--secondary-text: #606770;
--border-color: #e0e0e0;
--accent-color: #007bff;
--mic-button-bg: #28a745;
--mic-recording-bg: #dc3545;
/* Note: WeChat Mini Program does not fully support custom font families directly via CSS import. */
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
page {
height: 100%;
background-color: var(--background-color);
}
body {
/* In Mini Program, use 'page' for root styling, 'body' is not applicable */
}
.container {
width: 100%;
max-width: 500px; /* Optimized for mobile width */
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 1rem;
height: 100vh; /* Use 100vh for full height in Mini Program */
padding: 1rem;
box-sizing: border-box;
}
.io-container {
display: flex;
flex-direction: column;
gap: 100rpx; /* Adjust this value as needed */
}
.language-panel {
background-color: var(--card-bg);
padding: 0.75rem;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.panel-label {
font-size: 0.9rem;
font-weight: 600;
margin-bottom: 0.75rem;
text-align: center;
color: var(--primary-text);
}
.language-buttons {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
}
.lang-button {
display: inline-flex; /* Use inline-flex to allow spacing */
flex-direction: column;
align-items: center;
justify-content: center;
width: 44px; /* Set a fixed width for the button */
height: 44px; /* Set a fixed height to make it a square */
margin: 5px;
padding: 0;
border: 2px solid transparent; /* Start with a transparent border */
border-radius: 50%; /* Make it a circle */
background-color: #f0f0f0;
transition: all 0.2s ease-in-out;
box-sizing: border-box; /* Ensure padding and border are inside the width/height */
}
.lang-button.selected {
border-color: #007aff; /* Blue border for selected state */
transform: scale(1.1); /* Slightly enlarge the selected button */
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.flag-icon {
width: 32px; /* Adjust flag size to fit inside the circle */
height: 32px;
border-radius: 50%; /* Make the flag image itself circular */
object-fit: cover; /* Ensure the image covers the area nicely */
}
.mic-container {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
#mic-btn {
width: 70px;
height: 70px;
border-radius: 50%;
background-color: #007aff;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
transition: all 0.2s ease;
}
#mic-btn.recording {
background-color: #ff3b30; /* Red color when recording */
transform: scale(1.1);
box-shadow: 0 6px 16px rgba(255, 59, 48, 0.5);
}