/** * Talking Snake - Main Stylesheet * A warm, accessible color scheme inspired by the talking snake logo */ :root { /* Warm, friendly palette inspired by the talking snake logo */ --bg: #fff7e9; /* Warm cream background */ --surface: #fff; /* Clean white cards */ --primary: #d4763a; /* Warm orange - friendly & energetic */ --primary-hover: #c06830; /* Darker orange for hover */ --secondary: #5a8f5a; /* Soft green - snake accent */ --text: #3d3425; /* Warm dark brown - easy on eyes */ --text-muted: #7a6f5f; /* Muted brown */ --border: #e5d9c8; /* Warm border */ --success: #5a8f5a; /* Green for success states */ --error: #c45a4a; /* Soft red for errors */ } * { box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; margin: 0; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; } .main-content { display: flex; flex-direction: column; align-items: center; flex: 1; justify-content: center; width: 100%; } h1 { font-family: Fredoka, sans-serif; font-size: 1.75rem; margin: 0 0 0.5rem; color: var(--primary); display: inline; vertical-align: baseline; } .subtitle { color: var(--text-muted); margin: 0; font-size: 0.9rem; display: inline; vertical-align: baseline; } .header-row { margin-bottom: 0.5rem; text-align: center; } .container { max-width: 500px; width: 100%; } /* Options Row - Style and Language selectors */ .options-row { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: nowrap; } /* Style Selector */ .style-selector, .language-selector { display: flex; align-items: center; gap: 0.4rem; flex-wrap: nowrap; } .style-label { font-size: 0.75rem; color: var(--text-muted); } .style-buttons { display: flex; gap: 0.25rem; } .style-btn { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 0.75rem; line-height: 1; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; } .style-btn i { display: block; line-height: 1; } /* Language buttons use emoji flags */ .style-btn.lang-btn { font-size: 1rem; line-height: 1; padding: 0; } .style-btn:hover { border-color: var(--primary); color: var(--text); } .style-btn.active { background: rgb(212, 118, 58, 0.15); border-color: var(--primary); color: var(--primary); } /* Auto-detected language indicator */ .style-btn.lang-btn.auto-detected { animation: auto-detect-pulse 0.5s ease-out; box-shadow: 0 0 0 2px var(--primary); } @keyframes auto-detect-pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 118, 58, 0.7); } 50% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(212, 118, 58, 0.4); } 100% { transform: scale(1); box-shadow: 0 0 0 2px var(--primary); } } /* Input Section - hidden during processing */ .input-section.hidden { display: none; } /* Processing Section - two row layout */ .processing-section { display: none; flex-direction: column; gap: 0.75rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: 10px; border: 1px solid var(--border); width: 100%; } .processing-section.visible { display: flex; } /* Row 1: Document info */ .processing-row-1 { display: flex; align-items: center; width: 100%; } /* Row 2: Status, progress, buttons */ .processing-row-2 { display: flex; align-items: center; gap: 0.75rem; } /* Document Info - fills first row */ .doc-info { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text); width: 100%; min-width: 0; } .doc-info:empty { display: none; } .doc-info .doc-name { font-weight: 600; display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; } .doc-info .doc-name i { color: var(--primary); flex-shrink: 0; } .doc-info .doc-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .doc-info .doc-pages, .doc-info .doc-chars { color: var(--text-muted); font-size: 0.75rem; display: flex; align-items: center; gap: 0.25rem; white-space: nowrap; flex-shrink: 0; } .doc-info .doc-pages i, .doc-info .doc-chars i { font-size: 0.7rem; opacity: 0.6; } .doc-info .doc-style, .doc-info .doc-lang { color: var(--text-muted); font-size: 0.75rem; display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; opacity: 0.7; } .doc-info .doc-style i { font-size: 0.7rem; } /* Status in processing */ .processing-section .status { padding: 0; background: none; font-size: 0.8rem; white-space: nowrap; flex-shrink: 0; } /* Processing progress bar */ .processing-progress-container { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; min-width: 60px; } .processing-progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, #c06030 100%); border-radius: 3px; width: 0%; transition: width 0.3s ease; } /* Control buttons row */ .control-buttons { display: flex; gap: 0.5rem; flex-shrink: 0; } .control-btn { width: 36px; height: 36px; padding: 0; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; } .control-btn.hidden { display: none; } .control-btn:hover { color: var(--primary); border-color: var(--primary); background: rgb(212, 118, 58, 0.08); } .pause-btn:hover { color: var(--primary); } .control-btn.play-btn { color: var(--success); border-color: var(--success); } .control-btn.play-btn:hover { background: rgba(116, 184, 22, 0.15); } .stop-btn:hover { color: var(--error); border-color: var(--error); background: rgb(196, 90, 74, 0.08); } @keyframes gradient-idle { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } } @keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } /* Drop Zone */ .drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 1rem 0; text-align: center; transition: all 0.2s ease; cursor: pointer; background: var(--surface); } .drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: rgb(212, 118, 58, 0.08); } .drop-zone p { margin: 0 0 0.75rem; font-size: 0.95rem; } .drop-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.75rem; display: block; } /* Tabs */ .tabs { display: flex; gap: 0.25rem; margin-bottom: 0.75rem; } .tab { flex: 1; padding: 0.5rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; transition: all 0.15s ease; } .tab:hover { border-color: var(--primary); color: var(--text); } .tab.active { background: rgb(212, 118, 58, 0.12); border-color: var(--primary); color: var(--primary); } .tab-content { display: none; opacity: 0; transform: translateY(-8px); } .tab-content.active { display: block; opacity: 1; transform: translateY(0); animation: tab-fade-in 0.2s ease-out; } @keyframes tab-fade-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } /* URL Form */ .url-form { background: var(--surface); border-radius: 8px; padding: 0.75rem; } .url-input-row { display: flex; gap: 0.5rem; align-items: center; } .url-input-row input[type="url"] { flex: 1; height: 40px; padding: 0 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.9rem; transition: border-color 0.15s ease; } .url-input-row input[type="url"]:focus { outline: none; border-color: var(--primary); } .url-input-row input[type="url"]::placeholder { color: var(--text-muted); } /* Text Form */ .text-form { background: var(--surface); border-radius: 8px; padding: 1rem; } .text-form textarea { width: 100%; padding: 0.6rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.9rem; margin-bottom: 0.75rem; transition: border-color 0.15s ease; resize: vertical; min-height: 120px; font-family: inherit; line-height: 1.5; } .text-form textarea:focus { outline: none; border-color: var(--primary); } .text-form textarea::placeholder { color: var(--text-muted); } /* Buttons */ .submit-btn { width: 100%; padding: 0.6rem 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease; margin-bottom: 0.5rem; } .submit-btn:hover { color: var(--primary); border-color: var(--primary); background: rgb(212, 118, 58, 0.08); } .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* URL form button override - must come after base .submit-btn */ .url-input-row .submit-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; margin: 0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; } .url-input-row .submit-btn i { margin: 0; padding: 0; line-height: 1; display: block; } input[type="file"] { display: none; } .hidden-file-input { display: none !important; } .file-label { display: inline-block; padding: 0.5rem 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.9rem; transition: all 0.2s ease; } .file-label:hover { color: var(--primary); border-color: var(--primary); background: rgb(212, 118, 58, 0.08); } /* Device Info - Subtle footer-like display */ .device-info { display: none; justify-content: center; align-items: center; gap: 0.6rem; padding: 0.4rem 1rem; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; opacity: 0.7; line-height: 1.2; } .device-info.visible { display: flex; flex-wrap: wrap; row-gap: 0.2rem; } .device-info i { color: var(--primary); opacity: 0.8; } .device-memory { display: flex; align-items: center; gap: 0.25rem; } .device-memory i { font-size: 0.6rem; } .device-ephemeral { display: flex; align-items: center; gap: 0.25rem; color: var(--success); } .device-ephemeral i { color: var(--success); font-size: 0.6rem; } .device-timing { display: flex; align-items: center; gap: 0.25rem; color: var(--text-muted); } .device-timing i { font-size: 0.6rem; } /* Model state indicators */ .model-state { display: flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.65rem; } .model-state i { font-size: 0.55rem; } .model-loaded { background: rgb(16, 185, 129, 0.15); color: var(--success); } .model-loading, .model-unloading { background: rgb(245, 158, 11, 0.15); color: #f59e0b; } .model-unloaded { background: rgb(107, 114, 128, 0.15); color: var(--text-muted); } .device-batch { background: var(--surface); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.65rem; } /* Icon spacing in buttons and tabs */ .tab i, .submit-btn i, .file-label i { margin-right: 0.4rem; } /* Status Messages */ .status { font-size: 0.85rem; display: none; } .status.visible { display: block; } .status i { margin-right: 0.4rem; } .status.loading { color: var(--text-muted); } .status.error { color: var(--error); } .status.success { color: var(--success); } /* Audio Player */ .player { margin-top: 1rem; width: 100%; display: none; padding: 0.75rem 1rem; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); } .player.visible { display: block; animation: slide-in 0.3s ease-out; } .player.deleting { animation: slide-out 0.3s ease-out forwards; } @keyframes slide-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } @keyframes slide-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-10px); } } /* Hidden audio element */ #audio { display: none; } /* Custom Audio Player */ .custom-player { display: flex; align-items: center; gap: 0.75rem; } .player-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: all 0.2s ease; flex-shrink: 0; } .player-btn:hover { color: var(--primary); border-color: var(--primary); background: rgb(212, 118, 58, 0.08); } .player-btn.play-btn { width: 40px; height: 40px; font-size: 0.9rem; } .player-btn.volume-btn { width: 32px; height: 32px; font-size: 0.8rem; } .player-btn.volume-btn:hover { color: var(--text); } .player-btn.download-btn { width: 32px; height: 32px; font-size: 0.8rem; } .player-btn.download-btn:hover { color: var(--primary); } .player-btn.delete-btn { width: 32px; height: 32px; font-size: 0.8rem; } .player-btn.delete-btn:hover { color: var(--error); border-color: var(--error); background: rgb(196, 90, 74, 0.08); } .progress-container { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; position: relative; cursor: pointer; } .progress-bar { height: 100%; background: var(--primary); border-radius: 3px; width: 0%; transition: width 0.1s ease; pointer-events: none; } .progress-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; appearance: none; } .progress-slider::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; cursor: pointer; } .progress-slider::-moz-range-thumb { width: 14px; height: 14px; background: var(--primary); border-radius: 50%; cursor: pointer; border: none; } .time-display { font-size: 0.75rem; color: var(--text-muted); min-width: 80px; text-align: center; font-variant-numeric: tabular-nums; } .filename { margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--text); word-break: break-all; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; } .filename-meta { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--text-muted); margin-left: auto; } /* Spinner Animation */ .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--text-muted); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 0.4rem; vertical-align: -2px; } @keyframes spin { to { transform: rotate(360deg); } } /* Footer */ footer { margin-top: auto; padding-top: 1.5rem; color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; } footer a { color: var(--primary); text-decoration: none; } footer a:hover { text-decoration: underline; } footer i.fa-heart { color: var(--error); } footer i.fa-github { margin-right: 0.2rem; } /* Logo */ .logo { width: 250px; height: auto; margin-bottom: 0.75rem; } /* Tablet styles */ @media (width <= 768px) { body { padding: 1rem; } h1 { font-size: 1.5rem; } .logo { width: 200px; } .drop-zone { padding: 1.25rem 1rem; } .tabs { flex-direction: column; } .tab { width: 100%; } } /* Mobile styles */ @media (width <= 480px) { body { padding: 0.75rem; } h1 { font-size: 1.35rem; } .subtitle { font-size: 0.8rem; } .logo { width: 160px; } .drop-zone { padding: 1rem; } .drop-zone p { font-size: 0.9rem; } .url-form { padding: 0.75rem; } .url-form input[type="url"] { padding: 0.5rem; font-size: 0.85rem; } .submit-btn, .file-label { padding: 0.5rem 0.75rem; font-size: 0.85rem; } .filename { font-size: 0.75rem; padding: 0.4rem 0.5rem; } footer { font-size: 0.7rem; text-align: center; } } /* Ensure touch targets are large enough */ @media (pointer: coarse) { .tab, .submit-btn, .file-label { min-height: 44px; display: flex; align-items: center; justify-content: center; } }