diff --git "a/index.html" "b/index.html" --- "a/index.html" +++ "b/index.html" @@ -8,182 +8,214 @@ @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap'); :root { + /* --- Light Theme Palette --- */ + --theme-bg: #F8F9FC; + --theme-panel-bg: #FFFFFF; + --theme-panel-border: #EAEFF7; + --theme-input-bg: #F6F8FB; + --theme-input-border: #E1E7EF; + --theme-text-primary: #1A202C; + --theme-text-secondary: #626F86; + --theme-text-tertiary: #8A94A6; + --theme-accent-primary: #4A6CFA; + --theme-accent-primary-hover: #3553D6; + --theme-accent-primary-glow: rgba(74, 108, 250, 0.25); + --theme-accent-secondary: #0FD4A8; + --theme-accent-secondary-hover: #0DA986; + --theme-accent-secondary-glow: rgba(15, 212, 168, 0.2); + --theme-waveform-active: var(--theme-accent-primary); + --theme-waveform-inactive: #D0D9E6; + --theme-shadow-sm: 0 1px 2px 0 rgba(26, 32, 44, 0.03); + --theme-shadow-md: 0 4px 6px -1px rgba(26, 32, 44, 0.05), 0 2px 4px -2px rgba(26, 32, 44, 0.04); + --theme-shadow-lg: 0 10px 15px -3px rgba(26, 32, 44, 0.06), 0 4px 6px -4px rgba(26, 32, 44, 0.05); + --theme-shadow-xl: 0 20px 25px -5px rgba(26, 32, 44, 0.07), 0 8px 10px -6px rgba(26, 32, 44, 0.05); + --theme-toggle-bg: #EAEFF7; + --theme-toggle-icon: var(--theme-text-secondary); + + /* --- General Variables --- */ --app-font: 'Vazirmatn', sans-serif; - --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + --radius-card: 24px; + --radius-btn: 14px; + --radius-input: 12px; + --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); + --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); + } - /* --- Light Mode Palette --- */ - --app-bg-light: #F7F9FC; - --panel-bg-light: #FFFFFF; - --panel-border-light: #E9EEF5; - --text-primary-light: #1A202C; - --text-secondary-light: #5A677D; - --input-bg-light: #F8FAFC; - --accent-primary-light: #3B82F6; - --accent-primary-hover-light: #2563EB; - --accent-secondary-light: #10B981; - --accent-secondary-hover-light: #059669; - --shadow-color-light: rgba(26, 32, 44, 0.08); - - /* --- Dark Mode Palette --- */ - --app-bg-dark: #121826; - --panel-bg-dark: #1A2233; - --panel-border-dark: #2C3649; - --text-primary-dark: #E2E8F0; - --text-secondary-dark: #94A3B8; - --input-bg-dark: #161D2B; - --accent-primary-dark: #60A5FA; - --accent-primary-hover-dark: #93C5FD; - --accent-secondary-dark: #34D399; - --accent-secondary-hover-dark: #6EE7B7; - --shadow-color-dark: rgba(0, 0, 0, 0.25); - } - - /* --- Apply Theme --- */ - body { - --app-bg: var(--app-bg-light); - --panel-bg: var(--panel-bg-light); - --panel-border: var(--panel-border-light); - --text-primary: var(--text-primary-light); - --text-secondary: var(--text-secondary-light); - --input-bg: var(--input-bg-light); - --accent-primary: var(--accent-primary-light); - --accent-primary-hover: var(--accent-primary-hover-light); - --accent-secondary: var(--accent-secondary-light); - --accent-secondary-hover: var(--accent-secondary-hover-light); - --shadow-color: var(--shadow-color-light); - - --shadow-subtle: 0 2px 8px var(--shadow-color); - --shadow-medium: 0 6px 16px -2px var(--shadow-color), 0 3px 8px -3px var(--shadow-color); - --shadow-strong: 0 10px 25px -5px var(--shadow-color), 0 6px 15px -6px var(--shadow-color); - } - - body.dark-mode { - --app-bg: var(--app-bg-dark); - --panel-bg: var(--panel-bg-dark); - --panel-border: var(--panel-border-dark); - --text-primary: var(--text-primary-dark); - --text-secondary: var(--text-secondary-dark); - --input-bg: var(--input-bg-dark); - --accent-primary: var(--accent-primary-dark); - --accent-primary-hover: var(--accent-primary-hover-dark); - --accent-secondary: var(--accent-secondary-dark); - --accent-secondary-hover: var(--accent-secondary-hover-dark); - --shadow-color: var(--shadow-color-dark); - } - - @keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } - @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } - @keyframes modalZoomIn { from { opacity: 0; transform: scale(0.8) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } } - @keyframes modalZoomOut { from { opacity: 1; transform: scale(1) translateY(0); } to { opacity: 0; transform: scale(0.8) translateY(20px); } } - @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } + html.dark-mode { + /* --- Dark Theme Palette --- */ + --theme-bg: #121826; + --theme-panel-bg: #1A2130; + --theme-panel-border: #2A3346; + --theme-input-bg: #171E2B; + --theme-input-border: #2A3346; + --theme-text-primary: #F0F4F9; + --theme-text-secondary: #90A0B7; + --theme-text-tertiary: #626F86; + --theme-accent-primary: #5F80FF; + --theme-accent-primary-hover: #7D99FF; + --theme-accent-primary-glow: rgba(95, 128, 255, 0.25); + --theme-accent-secondary: #17E0BB; + --theme-accent-secondary-hover: #4CFAD8; + --theme-accent-secondary-glow: rgba(23, 224, 187, 0.2); + --theme-waveform-active: var(--theme-accent-primary); + --theme-waveform-inactive: #434E68; + --theme-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + --theme-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); + --theme-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); + --theme-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); + --theme-toggle-bg: #2A3346; + --theme-toggle-icon: var(--theme-text-secondary); + } + @keyframes fadeIn { + from { opacity: 0; transform: translateY(15px); } + to { opacity: 1; transform: translateY(0); } + } + @keyframes modalZoomIn { + from { opacity: 0; transform: scale(0.9) translateY(20px); } + to { opacity: 1; transform: scale(1) translateY(0); } + } + @keyframes pulse-wave { + 0% { transform: scale(0.6); opacity: 0.5; } + 50% { opacity: 1; } + 100% { transform: scale(1.4); opacity: 0; } + } + + /* --- Base Styles --- */ body { font-family: var(--app-font); direction: rtl; - background-color: var(--app-bg); - color: var(--text-primary); + background-color: var(--theme-bg); + color: var(--theme-text-primary); font-size: 16px; line-height: 1.8; margin: 0; - display: flex; - flex-direction: column; - align-items: center; + padding: 2.5rem 0; min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - transition: background-color 0.3s, color 0.3s; + display: flex; + justify-content: center; + align-items: flex-start; + overflow-x: hidden; + transition: background-color var(--transition-smooth), color var(--transition-smooth); + background-image: radial-gradient(var(--theme-text-tertiary) 0.5px, transparent 0.5px); + background-size: 20px 20px; + background-position: -10px -10px; } - .container { - max-width: 780px; - width: 92%; - margin: 2.5rem auto; - flex-grow: 1; - } - - .page-header { + .container { max-width: 820px; width: 92%; margin: 0 auto; } + + /* --- Theme Toggle Switch --- */ + .theme-switch-wrapper { display: flex; - justify-content: space-between; align-items: center; - margin-bottom: 1rem; + justify-content: center; + margin-bottom: 2rem; + animation: fadeIn 0.8s 0.1s ease-out backwards; } - - .theme-switcher { - background: var(--panel-bg); - border: 1px solid var(--panel-border); + .theme-switch { + display: inline-block; + height: 34px; + position: relative; + width: 60px; + } + .theme-switch input { display: none; } + .slider { + background-color: var(--theme-toggle-bg); + bottom: 0; + cursor: pointer; + left: 0; + position: absolute; + right: 0; + top: 0; + transition: var(--transition-smooth); + border-radius: 34px; + } + .slider:before { + background-color: #fff; + bottom: 4px; + content: ""; + height: 26px; + left: 4px; + position: absolute; + transition: var(--transition-smooth); + width: 26px; border-radius: 50%; - width: 44px; - height: 44px; display: flex; align-items: center; justify-content: center; - cursor: pointer; - color: var(--text-secondary); - box-shadow: var(--shadow-subtle); - transition: var(--transition-smooth); + color: var(--theme-toggle-icon); } - .theme-switcher:hover { - color: var(--accent-primary); - transform: scale(1.1) rotate(15deg); - box-shadow: var(--shadow-medium); + input:checked + .slider { background-color: var(--theme-accent-primary); } + input:checked + .slider:before { transform: translateX(26px); } + .slider-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + color: var(--theme-toggle-icon); + font-size: 14px; + transition: var(--transition-smooth); } - .theme-switcher svg { width: 24px; height: 24px; } - .theme-switcher .moon-icon { display: none; } - body.dark-mode .theme-switcher .sun-icon { display: none; } - body.dark-mode .theme-switcher .moon-icon { display: block; } + .sun-icon { right: 8px; opacity: 1; } + .moon-icon { left: 8px; opacity: 0; } + html.dark-mode .sun-icon { opacity: 0; } + html.dark-mode .moon-icon { opacity: 1; } + /* --- App Header --- */ .app-header { - padding: 0.5rem 0 2rem 0; + padding: 0.5rem 0 2.5rem 0; text-align: center; - animation: fadeInDown 0.8s 0.1s ease-out backwards; + margin-bottom: 1.5rem; + animation: fadeIn 0.8s 0.2s ease-out backwards; } .app-header h1 { - font-size: 2.3em; + font-size: 2.5em; font-weight: 900; - margin: 0 0 0.6rem 0; - background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); + margin: 0 0 0.8rem 0; + background: linear-gradient(90deg, var(--theme-accent-primary), var(--theme-accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; - letter-spacing: -0.5px; + letter-spacing: -1px; } .app-header p { - font-size: 1em; - color: var(--text-secondary); - margin: 0; + font-size: 1.05em; + color: var(--theme-text-secondary); + margin-top: 0; + opacity: 0.9; font-weight: 400; - line-height: 1.6; + line-height: 1.7; } + /* --- Main Content Panel --- */ .main-content { - padding: 2.5rem; - background-color: var(--panel-bg); - border-radius: 24px; - box-shadow: var(--shadow-strong); - border: 1px solid var(--panel-border); - animation: fadeInUp 0.8s 0.3s ease-out backwards; - transition: background-color 0.3s, border-color 0.3s; + padding: 3rem; + background-color: var(--theme-panel-bg); + border-radius: var(--radius-card); + box-shadow: var(--theme-shadow-xl); + border: 1px solid var(--theme-panel-border); + animation: fadeIn 0.8s 0.4s ease-out backwards; + transition: background-color var(--transition-smooth), border-color var(--transition-smooth); } - - .form-group { margin-bottom: 2rem; } - + .form-group { margin-bottom: 2.2rem; } label { display: block; font-weight: 700; - color: var(--text-primary); - font-size: 1.05em; - margin-bottom: 0.8rem; - transition: color 0.3s; + color: var(--theme-text-primary); + font-size: 1.1em; + margin-bottom: 1rem; } + /* --- Inputs & Textarea --- */ textarea, input[type="text"] { width: 100%; - padding: 0.9rem 1.1rem; - border-radius: 14px; - border: 1px solid var(--panel-border); - background-color: var(--input-bg); - color: var(--text-primary); - box-shadow: var(--shadow-subtle) inset; + padding: 1rem 1.2rem; + border-radius: var(--radius-input); + border: 1px solid var(--theme-input-border); + background-color: var(--theme-input-bg); + color: var(--theme-text-primary); + box-shadow: var(--theme-shadow-sm) inset; font-family: var(--app-font); font-size: 1rem; box-sizing: border-box; @@ -191,816 +223,807 @@ } textarea:focus, input[type="text"]:focus { outline: none; - border-color: var(--accent-primary); - box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 25%, transparent), var(--shadow-subtle) inset; - background-color: var(--panel-bg); + border-color: var(--theme-accent-primary); + box-shadow: 0 0 0 3px var(--theme-accent-primary-glow), var(--theme-shadow-sm) inset; + background-color: var(--theme-panel-bg); } textarea { min-height: 120px; resize: vertical; } .char-counter-wrapper { font-size: 0.85em; - color: var(--text-secondary); + color: var(--theme-text-tertiary); text-align: left; - margin-top: 0.5rem; + margin-top: 0.75rem; padding: 0 0.2rem; } - #char-count { font-weight: 600; color: var(--accent-primary); } + #char-count { font-weight: 600; color: var(--theme-accent-primary); } + /* --- Speaker Selection Display --- */ + #selected-speaker-display { text-align: center; margin-top: 1.5rem; } #selected-speaker-card { - display: flex; + display: inline-flex; align-items: center; - background: linear-gradient(135deg, var(--input-bg) 0%, color-mix(in srgb, var(--panel-bg) 50%, transparent) 100%); - border-radius: 24px; - padding: 1rem 1.2rem; - box-shadow: var(--shadow-medium); - border: 1px solid var(--panel-border); + background: linear-gradient(135deg, var(--theme-input-bg) 0%, var(--theme-panel-bg) 100%); + border-radius: 50px; + padding: 0.75rem 0.75rem 0.75rem 1.5rem; + box-shadow: var(--theme-shadow-md); + border: 1px solid var(--theme-panel-border); transition: var(--transition-bounce); cursor: pointer; - position: relative; + margin-bottom: 1.5rem; } #selected-speaker-card:hover { transform: translateY(-6px) scale(1.03); - box-shadow: var(--shadow-strong); - } - #selected-speaker-card::after { - content: 'تغییر'; - position: absolute; - left: 1.2rem; top: 50%; - transform: translateY(-50%); - font-size: 0.85em; font-weight: 600; - background: var(--accent-primary); - color: white; - padding: 4px 12px; - border-radius: 10px; - opacity: 0; - transition: var(--transition-smooth); - } - #selected-speaker-card:hover::after { - opacity: 1; - transform: translateY(-50%) scale(1.1); + box-shadow: var(--theme-shadow-lg); + border-color: var(--theme-accent-primary); } #selected-speaker-card img { - width: 75px; height: 75px; + width: 60px; height: 60px; border-radius: 50%; object-fit: cover; - margin-left: 18px; - border: 3px solid var(--accent-secondary); - box-shadow: 0 0 12px -2px color-mix(in srgb, var(--accent-secondary) 50%, transparent); + margin-left: 1rem; + border: 3px solid var(--theme-accent-secondary); + box-shadow: 0 0 15px -3px var(--theme-accent-secondary-glow); transition: var(--transition-smooth); } - #selected-speaker-card:hover img { - transform: scale(1.08) rotate(3deg); + #selected-speaker-info { text-align: right; } + #selected-speaker-info h3 { margin: 0; font-size: 1.25em; font-weight: 800; } + #selected-speaker-info p { margin: 2px 0 0; color: var(--theme-text-secondary); font-size: 0.85em; font-weight: 500; } + + #change-speaker-btn { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 12px 24px; + border-radius: var(--radius-btn); + background: var(--theme-panel-bg); + border: 1px solid var(--theme-input-border); + color: var(--theme-text-primary); + cursor: pointer; + font-family: var(--app-font); font-weight: 600; font-size: 1em; + transition: var(--transition-smooth); + box-shadow: var(--theme-shadow-md); + } + #change-speaker-btn:hover { + background: var(--theme-input-bg); + border-color: var(--theme-accent-primary); + color: var(--theme-accent-primary); + transform: translateY(-3px) scale(1.05); + box-shadow: var(--theme-shadow-lg); } - #selected-speaker-info h3 { margin: 0; font-size: 1.35em; font-weight: 800; color: var(--text-primary); } - #selected-speaker-info p { margin: 4px 0 0; color: var(--text-secondary); font-size: 0.88em; font-weight: 500; } - .slider-container { display: flex; align-items: center; gap: 1.2rem; } + /* --- Modals --- */ + .modal-overlay { + position: fixed; top: 0; left: 0; width: 100%; height: 100%; + background-color: rgba(18, 24, 38, 0.6); + backdrop-filter: blur(10px) saturate(150%); + display: none; align-items: center; justify-content: center; + z-index: 1000; opacity: 0; + transition: opacity var(--transition-smooth); + } + .modal-overlay.visible { display: flex; opacity: 1; } + .modal-dialog { + background: var(--theme-panel-bg); + padding: 2.5rem; + border-radius: var(--radius-card); + width: 90%; + box-shadow: var(--theme-shadow-xl); + border: 1px solid var(--theme-panel-border); + opacity: 0; + animation: modalZoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; + } + .modal-header { + display: flex; justify-content: space-between; align-items: center; + margin-bottom: 2rem; padding-bottom: 1.5rem; + border-bottom: 1px solid var(--theme-panel-border); + } + .modal-header h2 { + margin: 0; font-size: 1.8em; font-weight: 800; + color: var(--theme-accent-primary); + } + .close-modal-btn { + background: none; border: none; font-size: 2.5rem; cursor: pointer; + color: var(--theme-text-tertiary); transition: var(--transition-smooth); line-height: 1; + } + .close-modal-btn:hover { + color: var(--theme-accent-primary); transform: rotate(90deg) scale(1.1); + } + + #speaker-modal .modal-dialog { max-width: 750px; max-height: 85vh; overflow-y: auto; } + #speaker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1.5rem; } + .speaker-card { + cursor: pointer; transition: var(--transition-smooth); text-align: center; + position: relative; border-radius: var(--radius-card); padding: 0.5rem; + } + .speaker-card:hover { transform: translateY(-8px); } + .speaker-card input[type="radio"] { display: none; } + .speaker-card .speaker-visual { + border: 3px solid transparent; border-radius: 18px; + overflow: hidden; box-shadow: var(--theme-shadow-md); + position: relative; background-color: var(--theme-input-bg); + transition: var(--transition-bounce); + } + .speaker-card:hover .speaker-visual { box-shadow: var(--theme-shadow-lg); } + .speaker-card img { + width: 100%; height: 130px; object-fit: cover; display: block; + background-color: #e0e0e0; border-radius: 14px; + transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); + } + .speaker-card:hover img { transform: scale(1.1); } + .speaker-card .speaker-name { + padding: 0.8rem 0.4rem 0.2rem; font-weight: 600; font-size: 0.95em; + color: var(--theme-text-secondary); transition: color 0.2s; + } + .speaker-card input[type="radio"]:checked + .speaker-visual { + border-color: var(--theme-accent-secondary); + box-shadow: 0 0 25px -5px var(--theme-accent-secondary-glow); + transform: scale(1.05); + } + + /* --- Slider --- */ + .label-with-info { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.2rem; } + .info-icon { + display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; + border-radius: 50%; background-color: var(--theme-input-bg); border: 1px solid var(--theme-input-border); + color: var(--theme-text-secondary); font-size: 0.9em; font-weight: 700; cursor: pointer; + transition: var(--transition-smooth); user-select: none; + } + .info-icon:hover { + background-color: var(--theme-accent-primary); color: white; border-color: var(--theme-accent-primary); + transform: scale(1.1); box-shadow: 0 0 10px var(--theme-accent-primary-glow); + } + .slider-container { display: flex; align-items: center; gap: 1.5rem; } input[type="range"] { - flex-grow: 1; -webkit-appearance: none; appearance: none; - width: 100%; height: 8px; - background: color-mix(in srgb, var(--panel-border) 50%, transparent); - border-radius: 4px; outline: none; - cursor: pointer; - transition: background 0.2s; + flex-grow: 1; -webkit-appearance: none; appearance: none; width: 100%; height: 6px; + background: var(--theme-input-border); border-radius: 3px; outline: none; cursor: pointer; } input[type="range"]::-webkit-slider-runnable-track { - background: linear-gradient(to right, var(--accent-secondary) 0%, var(--accent-primary) 100%); - height: 8px; - border-radius: 4px; + background: linear-gradient(to right, var(--theme-accent-secondary) 0%, var(--theme-accent-primary) 100%); + height: 6px; border-radius: 3px; } input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; appearance: none; - width: 22px; height: 22px; - background: #fff; - border-radius: 50%; cursor: pointer; - border: 3px solid var(--accent-primary); - box-shadow: 0 2px 6px var(--shadow-color); - margin-top: -7px; - transition: transform 0.2s ease, box-shadow 0.2s ease; - } - input[type="range"]:focus::-webkit-slider-thumb { - box-shadow: 0 3px 8px color-mix(in srgb, var(--accent-primary) 35%, transparent); + -webkit-appearance: none; appearance: none; width: 24px; height: 24px; + background: #fff; border-radius: 50%; cursor: pointer; + border: 4px solid var(--theme-accent-primary); box-shadow: var(--theme-shadow-md); + margin-top: -9px; transition: var(--transition-fast); + } + input[type="range"]:hover::-webkit-slider-thumb { + transform: scale(1.15); box-shadow: 0 0 0 8px var(--theme-accent-primary-glow); } #temperature-value { - font-weight: 700; background-color: var(--input-bg); - padding: 0.5rem 1rem; - border-radius: 8px; - border: 1px solid var(--panel-border); - min-width: 45px; text-align: center; - color: var(--accent-primary); - font-size: 1em; - box-shadow: var(--shadow-subtle); + font-weight: 700; background-color: var(--theme-input-bg); + padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid var(--theme-input-border); + min-width: 45px; text-align: center; color: var(--theme-accent-primary); + font-size: 1em; box-shadow: var(--theme-shadow-sm); } + /* --- Generate Button --- */ #generate-btn { - width: 100%; padding: 1rem 1.5rem; - font-size: 1.25em; font-weight: 800; + width: 100%; padding: 1.1rem 1.5rem; font-size: 1.25em; font-weight: 800; font-family: var(--app-font); - background: linear-gradient(95deg, var(--accent-secondary) 0%, var(--accent-primary) 100%); - color: #fff; - border: none; - border-radius: 14px; - cursor: pointer; + background: linear-gradient(95deg, var(--theme-accent-secondary) 0%, var(--theme-accent-primary) 100%); + color: #fff; border: none; border-radius: var(--radius-btn); cursor: pointer; transition: var(--transition-smooth), transform 0.15s ease-out; - box-shadow: 0 5px 15px -4px color-mix(in srgb, var(--accent-primary) 45%, transparent), 0 5px 15px -4px color-mix(in srgb, var(--accent-secondary) 35%, transparent); - position: relative; - overflow: hidden; - letter-spacing: 0.5px; + box-shadow: 0 6px 12px -3px var(--theme-accent-primary-glow), 0 6px 12px -3px var(--theme-accent-secondary-glow); + position: relative; overflow: hidden; letter-spacing: 0.5px; } #generate-btn:hover:not(:disabled) { transform: translateY(-5px) scale(1.02); - box-shadow: 0 8px 20px -4px color-mix(in srgb, var(--accent-primary) 55%, transparent), 0 8px 20px -4px color-mix(in srgb, var(--accent-secondary) 45%, transparent); + box-shadow: 0 8px 20px -4px var(--theme-accent-primary-glow), 0 8px 20px -4px var(--theme-accent-secondary-glow); } #generate-btn:disabled { - background: var(--text-secondary); - cursor: not-allowed; box-shadow: none; color: var(--panel-bg); - opacity: 0.7; transform: none; + background: var(--theme-text-tertiary); cursor: not-allowed; + box-shadow: none; color: var(--theme-text-secondary); } + /* --- Output Section & New Loader --- */ #output-section { - margin-top: 3rem; - display: flex; - align-items: center; - justify-content: center; - min-height: 200px; - position: relative; - box-sizing: border-box; - padding: 2rem; - background-color: var(--input-bg); - border-radius: 24px; - border: 2px dashed var(--panel-border); - box-shadow: var(--shadow-subtle) inset; - transition: var(--transition-smooth); + margin-top: 3rem; display: flex; align-items: center; justify-content: center; + flex-direction: column; min-height: 220px; position: relative; + box-sizing: border-box; padding: 2rem; background-color: var(--theme-input-bg); + border-radius: var(--radius-card); border: 2px dashed var(--theme-input-border); + box-shadow: var(--theme-shadow-sm) inset; transition: var(--transition-smooth); } #output-section.has-content { - background-color: var(--panel-bg); - border: 1px solid var(--panel-border); - box-shadow: var(--shadow-medium); - padding: 0; - min-height: auto; + background-color: var(--theme-panel-bg); border: 1px solid var(--theme-panel-border); + box-shadow: var(--theme-shadow-lg); padding: 0; min-height: auto; + } + #status-message { + font-weight: 500; color: var(--theme-text-secondary); text-align: center; + font-size: 1.1em; + } + #loading-animation-wrapper { + display: none; flex-direction: column; align-items: center; + justify-content: center; gap: 2rem; width: 100%; + } + .pulse-loader { + width: 120px; height: 120px; position: relative; + display: flex; align-items: center; justify-content: center; + } + .pulse-loader .pulse-wave { + width: 100%; height: 100%; border-radius: 50%; + border: 2px solid var(--theme-accent-primary); + position: absolute; animation: pulse-wave 2s ease-out infinite; + } + .pulse-loader .pulse-wave:nth-child(2) { animation-delay: -0.5s; border-color: var(--theme-accent-secondary); } + .pulse-loader .pulse-wave:nth-child(3) { animation-delay: -1.0s; } + .pulse-loader .pulse-icon { + font-size: 48px; color: var(--theme-accent-primary); } - #output-section.has-content #status-message, - #output-section.has-content #loading-animation-wrapper { display: none !important; } - #status-message { font-weight: 500; color: var(--text-secondary); text-align: center; font-size: 1.1em; } - - #loading-animation-wrapper { display: none; flex-direction: column; align-items: center; gap: 1.8rem; } - .orbital-loader { width: 110px; height: 110px; position: relative; animation: spin 10s linear infinite; } - .orbit { position: absolute; top: 50%; left: 50%; border: 2px dashed color-mix(in srgb, var(--accent-primary) 25%, transparent); border-radius: 50%; transform-origin: center center; } - .orbit:nth-child(1) { width: 35px; height: 35px; margin: -17.5px 0 0 -17.5px; animation: spin 2.8s linear infinite reverse; } - .orbit:nth-child(2) { width: 65px; height: 65px; margin: -32.5px 0 0 -32.5px; animation: spin 3.8s linear infinite; } - .orbit:nth-child(3) { width: 95px; height: 95px; margin: -47.5px 0 0 -47.5px; animation: spin 4.8s linear infinite reverse; } - .orbit .satellite { position: absolute; width: 10px; height: 10px; border-radius: 50%; background-color: var(--accent-primary); box-shadow: 0 0 8px var(--accent-primary), 0 0 12px var(--accent-secondary); } - .orbit:nth-child(1) .satellite { top: -5px; left: 50%; transform: translateX(-50%); } - .orbit:nth-child(2) .satellite { top: 50%; left: -5px; transform: translateY(-50%); background-color: var(--accent-secondary); } - .orbit:nth-child(3) .satellite { bottom: -5px; right: 50%; transform: translateX(50%); } - #loading-text { font-size: 1.2em; font-weight: 700; background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } - - /* --- Audio Player --- */ + #loading-text { + font-size: 1.2em; font-weight: 700; color: var(--theme-text-primary); text-align: center; + background: linear-gradient(90deg, var(--theme-accent-primary), var(--theme-accent-secondary)); + -webkit-background-clip: text; -webkit-text-fill-color: transparent; + } + + /* --- Professional Audio Player --- */ #audio-player-content { - display: none; - width: 100%; - padding: 2rem; - box-sizing: border-box; - flex-direction: column; - gap: 1.2rem; + display: none; width: 100%; padding: 2rem; box-sizing: border-box; + flex-direction: column; gap: 1.5rem; } .audio-waveform-container { - display: flex; - align-items: center; - gap: 1rem; - width: 100%; + display: flex; align-items: center; gap: 1rem; width: 100%; } .audio-time { - font-size: 0.9em; - color: var(--text-secondary); - min-width: 45px; - text-align: center; - font-variant-numeric: tabular-nums; - user-select: none; + font-size: 0.9em; color: var(--theme-text-secondary); min-width: 45px; + text-align: center; font-variant-numeric: tabular-nums; user-select: none; } - #audio-waveform { - flex-grow: 1; - height: 70px; - cursor: pointer; + .audio-waveform { + flex-grow: 1; height: 70px; position: relative; + display: flex; align-items: center; justify-content: center; + } + #audio-waveform-canvas { + display: block; max-width: 100%; height: 100%; } .audio-controls-group { - display: flex; - justify-content: center; - align-items: center; - gap: 1rem; + display: flex; justify-content: center; align-items: center; gap: 1rem; } - .audio-utility-controls { flex-grow: 1; display: flex; justify-content: flex-end; } - .audio-player-btn { - background: none; border: none; cursor: pointer; - color: var(--text-secondary); - transition: var(--transition-smooth); + .audio-utility-controls { + display: flex; align-items: center; justify-content: space-between; + width: 100%; padding: 0 1rem; + } + .audio-btn { + background: none; border: none; cursor: pointer; color: var(--theme-text-secondary); display: flex; align-items: center; justify-content: center; - padding: 8px; - border-radius: 50%; + border-radius: 50%; transition: var(--transition-fast); } - .audio-player-btn:hover { color: var(--accent-primary); background-color: var(--input-bg); } - .audio-player-btn:active { transform: scale(0.9); } - .audio-player-btn svg { width: 24px; height: 24px; fill: currentColor; } + .audio-btn:hover { color: var(--theme-accent-primary); background-color: var(--theme-accent-primary-glow); } + .audio-btn:active { transform: scale(0.92); } + .audio-skip-btn { width: 44px; height: 44px; } + .audio-skip-btn svg { width: 26px; height: 26px; fill: currentColor; } .audio-play-pause-btn-large { - width: 60px; height: 60px; - background-color: var(--accent-primary); - color: white; - box-shadow: var(--shadow-medium); + width: 64px; height: 64px; color: #fff; + background-color: var(--theme-accent-primary); box-shadow: var(--theme-shadow-md); } .audio-play-pause-btn-large:hover { - background-color: var(--accent-primary-hover); - transform: scale(1.05); + background-color: var(--theme-accent-primary-hover); + transform: scale(1.05); color: #fff; } - .audio-play-pause-btn-large svg { width: 32px; height: 32px; } + .audio-play-pause-btn-large svg { width: 32px; height: 32px; fill: currentColor; } + .audio-volume-btn { width: 40px; height: 40px; } + .audio-volume-btn svg { width: 22px; height: 22px; fill: currentColor; } .audio-speed-btn { font-family: var(--app-font); font-size: 0.9em; font-weight: 600; - background-color: transparent; border: 1px solid var(--panel-border); - border-radius: 12px; - min-width: 50px; text-align: center; - padding: 6px 10px; color: var(--text-primary); + background-color: var(--theme-input-bg); border: 1px solid var(--theme-input-border); + border-radius: 10px; min-width: 45px; text-align: center; + color: var(--theme-text-primary); box-shadow: var(--theme-shadow-sm); + padding: 8px 12px; } - .audio-speed-btn:hover { background-color: var(--input-bg); border-color: var(--accent-primary); } + .audio-speed-btn:hover { background-color: var(--theme-panel-bg); border-color: var(--theme-accent-primary); } - /* --- Modals --- */ - .modal-overlay { - position: fixed; top: 0; left: 0; width: 100%; height: 100%; - background-color: rgba(18, 24, 38, 0.6); - backdrop-filter: blur(8px) saturate(150%); - display: none; align-items: center; justify-content: center; - z-index: 1000; opacity: 0; - transition: opacity 0.3s ease; - } - .modal-overlay.visible { display: flex; opacity: 1; } - .modal-dialog { - background: var(--panel-bg); padding: 2rem; border-radius: 24px; - width: 90%; box-shadow: var(--shadow-strong); - border: 1px solid var(--panel-border); - opacity: 0; animation-duration: 0.35s; animation-fill-mode: forwards; - } - .modal-overlay.visible .modal-dialog { animation-name: modalZoomIn; } - .modal-overlay.hiding .modal-dialog { animation-name: modalZoomOut; } - .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--panel-border); } - .modal-header h2 { margin: 0; font-size: 1.6em; font-weight: 800; color: var(--accent-primary); } - .close-modal-btn { background: none; border: none; font-size: 2.5rem; cursor: pointer; color: var(--text-secondary); transition: var(--transition-smooth); line-height: 1; } - .close-modal-btn:hover { color: var(--accent-primary); transform: rotate(90deg) scale(1.1); } - #speaker-modal .modal-dialog { max-width: 700px; max-height: 85vh; overflow-y: auto; } - #speaker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1.5rem; } - .speaker-card { cursor: pointer; transition: var(--transition-smooth); text-align: center; position: relative; } - .speaker-card .speaker-visual { border: 3px solid transparent; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-subtle); background-color: var(--input-bg); transition: var(--transition-bounce); padding: 6px; } - .speaker-card:hover .speaker-visual { transform: translateY(-5px) scale(1.06); box-shadow: var(--shadow-medium); } - .speaker-card input[type="radio"] { display: none; } - .speaker-card img { width: 100%; height: 120px; object-fit: cover; display: block; background-color: #e0e0e0; transition: transform 0.35s ease; border-radius: 18px; } - .speaker-card:hover img { transform: scale(1.12); } - .speaker-card .speaker-name { padding: 0.8rem 0.4rem 0.1rem; font-weight: 600; font-size: 0.9em; color: var(--text-secondary); transition: color 0.2s; } - .speaker-card input[type="radio"]:checked + .speaker-visual { border-color: var(--accent-secondary); box-shadow: 0 0 25px -5px color-mix(in srgb, var(--accent-secondary) 75%, transparent); background: linear-gradient(135deg, var(--accent-secondary-hover), var(--accent-primary)); transform: scale(1.05); } - .speaker-card input[type="radio"]:checked + .speaker-visual img { border: 2px solid white; transform: scale(1.05); } - .speaker-card input[type="radio"]:checked ~ .speaker-name { color: var(--text-primary); font-weight: 700; } - - #hidden-audio-player { display: none; } - - .app-footer { - padding: 1.5rem 0; - text-align: center; - font-size: 0.9em; - color: var(--text-secondary); - } - .app-footer a { - color: var(--accent-primary); - text-decoration: none; - font-weight: 600; - } + #hidden-audio-player { display: none !important; } @media (max-width: 600px) { - .container { width: 95%; margin: 1.5rem auto; } - .main-content, .modal-dialog { padding: 1.5rem; } - .app-header h1 { font-size: 1.8em; } - .audio-controls-group { flex-wrap: wrap; } - .audio-utility-controls { justify-content: center; gap: 1rem; margin-top: 1rem;} + body { padding: 1.5rem 0; } + .main-content { padding: 1.5rem; } + .app-header h1 { font-size: 2em; } + #selected-speaker-card { flex-direction: column; padding: 1rem; border-radius: var(--radius-card); } + #selected-speaker-card img { margin-left: 0; margin-bottom: 1rem; } + #audio-player-content { padding: 1.5rem 1rem; gap: 1rem; } + .audio-waveform { height: 60px; } } -
+صدایی نو، تجربهای نوین در تبدیل متن به گفتار با هوش مصنوعی پیشرفته
+کیفیت استودیو، قدرت هوش مصنوعی. صدایی فراتر از انتظار خلق کنید.