SotiproAlpha2 / src /App.scss
Ezmary's picture
Update src/App.scss
2d9a144 verified
raw
history blame
10.1 kB
// 1. Import Tailwind's base, components, and utilities
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
// 2. Define CSS Variables
:root {
--radius: 0.625rem; /* 10px */
--radius-md: 0.5rem; /* 8px */
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--border: oklch(0.922 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--border: oklch(1 0 0 / 10%);
}
// 3. Apply base styles
@layer base {
* {
border-color: var(--border);
outline-color: var(--foreground);
box-sizing: border-box;
}
body {
@apply bg-background text-foreground;
overflow-x: hidden;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin: 0;
padding: 0;
}
html {
margin: 0;
padding: 0;
overflow-x: hidden;
}
}
.main-wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.media-area {
flex-grow: 1;
position: relative; // برای large-logo-container
}
#large-logo-container { // استایل از HTML مرجع شما
display: flex; // در App.tsx با flex items-center justify-center کنترل می شود
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
/* Notification Popover & Header controls (بدون تغییر از پاسخ قبلی) */
.notification-popover-wrapper {
position: fixed;
top: 1rem;
left: 50%;
transform: translateX(-50%);
z-index: 100;
width: calc(100% - 1rem);
max-width: 28rem;
display: flex;
justify-content: center;
pointer-events: none;
}
.popover-content {
width: 100%;
border-radius: var(--radius-md, 0.5rem);
border-width: 1px;
border-color: var(--border);
background-color: var(--popover);
color: var(--popover-foreground);
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
outline: none;
transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
opacity: 0;
transform: translateY(-100%) scale(0.9);
pointer-events: none;
&.open {
opacity: 1;
transform: translateY(0) scale(1);
pointer-events: auto;
}
}
.notification-popover-text-content {
background-color: #eff6ff;
font-size: 0.875rem;
line-height: 1.5rem;
direction: rtl;
padding: 1rem;
border-radius: var(--radius-md, 0.5rem);
color: oklch(0.145 0 0);
}
.dark .notification-popover-text-content {
background-color: oklch(0.25 0.05 230);
color: oklch(0.95 0.01 230);
}
.header-controls {
display: flex;
padding: 0.75rem 0.5rem;
justify-content: space-between;
align-items: center;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.header-button {
display: flex;
align-items: center;
justify-content: center;
padding: 0.5rem;
width: 40px;
height: 40px;
border-radius: var(--radius-lg, 0.625rem);
background-color: #e5e7eb;
cursor: pointer;
transition: background-color 0.2s, transform 0.1s ease-out;
svg {
opacity: 0.7;
stroke: #374151;
width: 24px;
height: 24px;
}
&:hover {
background-color: #d1d5db;
}
&:active {
background-color: #9ca3af;
transform: scale(0.95);
}
}
.dark .header-button {
background-color: oklch(0.28 0 0);
&:hover {
background-color: oklch(0.35 0 0);
}
&:active {
background-color: oklch(0.40 0 0);
transform: scale(0.95);
}
svg {
opacity: 0.8;
stroke: oklch(0.85 0 0);
}
}
/* Logo Animation Styling */
.logo-animation-wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
& > div > svg { // اطمینان از اینکه SVG داخل لوگو تمام فضا را پر می کند
width: 100%;
height: 100%;
}
}
.logo-animation-wrapper.for-footer {
// اگر نیاز به استایل خاصی برای لوگوی فوتر باشد
}
/* Footer styles to mimic HTML example */
.footer-controls-html-like {
width: 100%;
display: flex;
align-items: center; // برای هم ترازی عمودی
position: absolute;
bottom: 0;
padding: 2rem 3rem; // 32px top/bottom, 48px left/right (از HTML مرجع)
box-sizing: border-box;
z-index: 20; // بالاتر از محتوای مدیا
// چیدمان دکمه ها: میکروفون چپ، لوگو وسط (اگر فعال)، دوربین راست
// با استفاده از flex-grow برای لوگو، دکمه ها به کناره ها می چسبند
// یا با justify-content: space-between و margin auto برای لوگو
justify-content: space-between; // میکروفون چپ، دوربین راست
}
// کانتینر برای لوگوی کوچک در فوتر، برای قرارگیری دقیق بین دکمه ها
.small-logo-footer-html-like {
// این به صورت خودکار بین دو دکمه قرار می گیرد اگر فضای کافی باشد
// یا می توان آن را به صورت absolute در وسط قرار داد
// position: absolute;
// left: 50%;
// top: 50%;
// transform: translate(-50%, -50%);
// z-index: 1; // پشت دکمه ها اگر همپوشانی داشته باشند
// برای حالا، اجازه می دهیم با flex در جای خود قرار گیرد
display: flex;
align-items: center;
justify-content: center;
// اگر می خواهید دقیقاً وسط باشد و دکمه ها در کناره ها:
margin-left: auto;
margin-right: auto;
}
.control-button-wrapper { // برای دکمه دوربین و دکمه تعویض آن
position: relative;
display: flex;
justify-content: center;
}
// .cam-wrapper-html-like در ControlTray.tsx استفاده شده
.control-button {
height: 80px; // از HTML مرجع
width: 80px; // از HTML مرجع
border-radius: 9999px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-width: 1px;
border-color: var(--border);
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
cursor: pointer;
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
flex-shrink: 0;
z-index: 2; // اطمینان از اینکه دکمه ها قابل کلیک هستند
&:hover {
transform: scale(1.05);
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
// اطمینان از اینکه SVG داخل دکمه ها به درستی نمایش داده می شود
svg {
// اگر SVG ها خیلی بزرگ هستند، می توانید اندازه آنها را اینجا کنترل کنید
// مثال: width: 50%; height: 50%;
// یا با transform: scale(0.55); اگر در HTML اصلی شما اینگونه بوده
}
}
// ترتیب رنگ ها بر اساس HTML مرجع شما (میکروفون چپ، دوربین راست)
.mic-button-color { background-color: #fecdd3; } // قرمز برای میکروفون
.cam-button-color { background-color: #E0ECFF; } // آبی برای دوربین
.dark .mic-button-color { background-color: #5C2129; }
.dark .cam-button-color { background-color: #223355; }
/* Switch Camera Button (بدون تغییر از پاسخ قبلی) */
.switch-camera-button-container {
position: absolute;
bottom: calc(100% + 0.65rem);
left: 50%;
transform: translateX(-50%) translateY(15px) scale(0.7);
z-index: 5;
opacity: 0;
pointer-events: none;
transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
transform-origin: center bottom;
&.visible {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1);
pointer-events: auto;
}
}
.switch-camera-button-content {
width: 48px;
height: 48px;
background-color: var(--background);
border: 1px solid var(--border);
border-radius: 9999px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
cursor: pointer;
transform-origin: center;
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
&:hover {
transform: scale(1.12) rotate(-6deg);
box-shadow: 0 7px 15px rgba(0,0,0,0.18), 0 3px 6px rgba(0,0,0,0.12);
}
&:active {
transform: scale(1.03) rotate(0deg);
}
svg {
width: 22px;
height: 22px;
stroke: var(--foreground);
transition: transform 0.3s ease-in-out;
}
&:hover svg {
transform: rotate(360deg);
}
}
/* Keyframes for popover (بدون تغییر از پاسخ قبلی) */
@keyframes popover-drop-in {
0% { opacity: 0; transform: translateY(-100%) scale(0.9); }
70% { opacity: 1; transform: translateY(5px) scale(1.02); }
100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes popover-lift-out {
0% { opacity: 1; transform: translateY(0) scale(1); }
100% { opacity: 0; transform: translateY(-100%) scale(0.9); }
}
.animate-popover-open-top-center {
animation: popover-drop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}
.animate-popover-close-top-center {
animation: popover-lift-out 0.3s ease-in forwards;
}