Spaces:
Running
Running
// 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; | |
--radius-md: 0.5rem; | |
--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); // یا استفاده از text-custom-border اگر تعریف کردید | |
outline-color: theme('colors.custom-foreground'); // استفاده از رنگ تعریف شده در Tailwind | |
box-sizing: border-box; | |
} | |
body { | |
// *** MODIFIED: استفاده از کلاسهای جدید تعریف شده در tailwind.config.js *** | |
@apply bg-custom-background text-custom-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; | |
} | |
} | |
// ... (بقیه فایل App.scss بدون تغییر نسبت به آخرین نسخه موفق قبلی) ... | |
// (شامل .main-wrapper, .media-area, #large-logo-container, popover, header, .logo-animation-wrapper, footer, control-button, switch-camera, keyframes) | |
// فقط مطمئن شوید که در بخش .popover-content و .notification-popover-text-content هم از رنگهای مبتنی بر متغیر CSS یا کلاسهای Tailwind استفاده شده باشد. | |
// مثال برای .popover-content اگر از متغیرهای CSS استفاده میکنید: | |
.popover-content { | |
// ... سایر استایلها ... | |
background-color: var(--popover); // استفاده از متغیر CSS | |
color: var(--popover-foreground); // استفاده از متغیر CSS | |
border-color: var(--border); // استفاده از متغیر CSS | |
// ... | |
} | |
// مثال برای .notification-popover-text-content | |
.notification-popover-text-content { | |
// در نسخه قبلی از رنگهای ثابت استفاده شده بود که مشکلی ندارد | |
// background-color: #eff6ff; | |
// color: oklch(0.145 0 0); | |
// یا میتوانید آنها را هم به متغیر CSS یا کلاس Tailwind تبدیل کنید اگر بخواهید کاملا یکپارچه باشد | |
// مثال با کلاس Tailwind اگر تعریف شده باشند: | |
// @apply bg-blue-50 text-gray-800; | |
// .dark & { @apply bg-custom-dark-blue text-custom-light-text; } | |
// برای سادگی، فعلا همان رنگهای ثابت قبلی را نگه میداریم: | |
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); | |
} | |
.main-wrapper { min-height: 100vh; display: flex; flex-direction: column; } | |
.media-area { flex-grow: 1; position: relative; } | |
#large-logo-container { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none; } | |
.logo-animation-wrapper { | |
position: relative; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
& > .z-10 > svg { | |
width: 100%; | |
height: 100%; | |
} | |
} | |
.footer-controls-html-like { | |
width: 100%; | |
display: flex; | |
align-items: center; | |
position: absolute; | |
bottom: 2rem; | |
padding-left: 2.5rem; | |
padding-right: 2.5rem; | |
padding-top: 0.5rem; | |
padding-bottom: 0.5rem; | |
box-sizing: border-box; | |
z-index: 20; | |
justify-content: space-between; | |
} | |
.small-logo-footer-html-like { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
transform: translate(-50%, -50%); | |
z-index: 1; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.control-button-wrapper { | |
position: relative; | |
display: flex; | |
justify-content: center; | |
} | |
.control-button { | |
height: 80px; | |
width: 80px; | |
border-radius: 9999px; | |
padding: 0; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
border-width: 1px; | |
// border-color: var(--border); // یا text-custom-border | |
border-color: theme('colors.custom-border'); // استفاده از رنگ تعریف شده در Tailwind | |
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; | |
overflow: hidden; | |
&: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 { | |
&.reference-mic-svg { | |
width: 75%; | |
height: 75%; | |
} | |
} | |
} | |
.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-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); // یا bg-custom-background | |
background-color: theme('colors.custom-background'); | |
// border: 1px solid var(--border); // یا border-custom-border | |
border: 1px solid theme('colors.custom-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: theme('colors.custom-foreground'); transition: transform 0.3s ease-in-out; } | |
&:hover svg { transform: rotate(360deg); } | |
} | |
// Keyframes بدون تغییر | |
@keyframes popover-drop-in { /* ... */ } | |
@keyframes popover-lift-out { /* ... */ } | |
.animate-popover-open-top-center { animation-name: popover-drop-in; animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55); animation-fill-mode: forwards; } | |
.animate-popover-close-top-center { animation-name: popover-lift-out; animation-duration: 0.3s; animation-timing-function: ease-in; animation-fill-mode: forwards; } |