707 lines
15 KiB
CSS
707 lines
15 KiB
CSS
/* Box sizing reset */
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
line-height: 1.5;
|
|
font-weight: 400;
|
|
|
|
color-scheme: light dark;
|
|
|
|
/* --- Default Dark Theme Variables --- */
|
|
--bg-gradient: radial-gradient(circle at center, #444 0%, #000000 100%);
|
|
--glass-bg: rgba(255, 255, 255, 0.1);
|
|
--glass-border: rgba(255, 255, 255, 0.2);
|
|
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
|
--text-color: #ffffff;
|
|
--text-strong: #ffffff;
|
|
--text-secondary: rgba(255, 255, 255, 0.85);
|
|
--text-muted: rgba(255, 255, 255, 0.7);
|
|
--accent-cyan: #00f2fe;
|
|
--accent-purple: #4facfe;
|
|
--primary-accent: #00f2fe;
|
|
--title-glow: rgba(0, 255, 255, 0.2);
|
|
--toggle-bg: rgba(255, 255, 255, 0.08);
|
|
--toggle-border: rgba(255, 255, 255, 0.2);
|
|
--toggle-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
|
|
--toggle-btn-border: rgba(255, 255, 255, 0.2);
|
|
--toggle-hover-border: #ffffff;
|
|
--toggle-active-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
|
|
--panel-bg: rgba(0, 0, 0, 0.4);
|
|
--panel-border: rgba(255, 255, 255, 0.1);
|
|
--panel-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
|
--button-bg: rgba(255, 255, 255, 0.1);
|
|
--button-border: rgba(255, 255, 255, 0.2);
|
|
--button-text: #ffffff;
|
|
--button-hover-bg: rgba(255, 255, 255, 0.25);
|
|
--button-hover-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
|
--button-active-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
|
|
--title-gradient: linear-gradient(45deg, #00f2fe, #4facfe);
|
|
--ripple-color: rgba(255, 255, 255, 0.3);
|
|
--nav-item-weight: 400;
|
|
--list-hover-bg: rgba(255, 255, 255, 0.05);
|
|
--list-border: rgba(255, 255, 255, 0.12);
|
|
--header-bg: rgba(0, 0, 0, 0.6);
|
|
|
|
font-synthesis: none;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
:root[data-theme="light"] {
|
|
--bg-gradient: radial-gradient(circle at center, #ffffff 0%, #ddd 100%);
|
|
--glass-bg: rgba(255, 255, 255, 0.45);
|
|
--glass-border: rgba(15, 23, 42, 0.2);
|
|
--glass-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.15);
|
|
--text-color: #0f172a;
|
|
--text-strong: #020617;
|
|
--text-secondary: #334155;
|
|
--text-muted: #64748b;
|
|
--accent-cyan: #0ea5e9;
|
|
--accent-purple: #6366f1;
|
|
--primary-accent: #0ea5e9;
|
|
--title-glow: rgba(14, 165, 233, 0.35);
|
|
--toggle-bg: rgba(255, 255, 255, 1);
|
|
--toggle-border: rgba(15, 23, 42, 0.2);
|
|
--toggle-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
|
|
--toggle-btn-border: rgba(15, 23, 42, 0.15);
|
|
--toggle-hover-border: rgba(14, 165, 233, 0.6);
|
|
--toggle-active-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
|
|
--panel-bg: rgba(255, 255, 255, 0.9);
|
|
--panel-border: rgba(15, 23, 42, 0.12);
|
|
--panel-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
|
|
--button-bg: rgba(255, 255, 255, 0.7);
|
|
--button-border: rgba(255, 255, 255, 0.9);
|
|
--button-text: #0f172a;
|
|
--button-hover-bg: rgba(15, 23, 42, 0.1);
|
|
--button-hover-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
|
|
--button-active-shadow: 0 0 18px rgba(14, 165, 233, 0.25);
|
|
--title-gradient: linear-gradient(45deg, #0ea5e9, #6366f1);
|
|
--ripple-color: rgba(0, 0, 0, 0.1);
|
|
--list-hover-bg: rgba(15, 23, 42, 0.05);
|
|
--list-border: rgba(15, 23, 42, 0.08);
|
|
--header-bg: rgba(255, 255, 255, 0.6);
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
display: flex;
|
|
min-width: 320px;
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
|
|
color: var(--text-color);
|
|
background-color: var(--bg-gradient);
|
|
/* fallback but works if variable contains simple color */
|
|
background: var(--bg-gradient);
|
|
background-attachment: fixed;
|
|
}
|
|
|
|
.selectable {
|
|
user-select: text;
|
|
-webkit-user-select: text;
|
|
cursor: text;
|
|
}
|
|
|
|
#app {
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
body {
|
|
min-height: 100vh;
|
|
overflow: auto;
|
|
}
|
|
|
|
#app {
|
|
min-height: 100vh;
|
|
overflow: auto;
|
|
}
|
|
}
|
|
|
|
/* Removed global front camera mirror to restore stability */
|
|
|
|
/* --- Shared styles for all tools (moved from tools.css) --- */
|
|
|
|
.tool-container {
|
|
display: flex;
|
|
justify-content: center;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
margin: 0 auto;
|
|
height: 100%;
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.tool-container.full-width {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.tool-panel {
|
|
width: 100%;
|
|
padding: 1rem;
|
|
border-radius: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
height: 100%;
|
|
max-height: 100%;
|
|
overflow-y: auto;
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--glass-shadow);
|
|
}
|
|
|
|
/* Custom scrollbar for tool panel */
|
|
.tool-panel::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.tool-panel::-webkit-scrollbar-track {
|
|
background: rgba(0, 0, 0, 0.1);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.tool-panel::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.tool-panel::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.tool-title {
|
|
margin: 0;
|
|
text-align: left;
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
background: var(--title-gradient);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
color: transparent;
|
|
-webkit-text-fill-color: transparent;
|
|
filter: drop-shadow(0 0 10px var(--title-glow));
|
|
}
|
|
|
|
|
|
|
|
.tool-textarea,
|
|
.select-input {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
background-color: var(--toggle-bg);
|
|
border: 1px solid var(--toggle-border);
|
|
border-radius: 8px;
|
|
color: var(--text-color);
|
|
font-family: inherit;
|
|
font-size: 0.95rem;
|
|
transition: all 0.3s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
::placeholder {
|
|
color: var(--text-muted);
|
|
opacity: 1;
|
|
/* Override Firefox default opacity */
|
|
}
|
|
|
|
.tool-textarea {
|
|
font-family: monospace;
|
|
resize: none;
|
|
height: 100%;
|
|
}
|
|
|
|
.select-input {
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 0.75rem center;
|
|
background-size: 1rem;
|
|
padding-right: 2.5rem;
|
|
height: 40px;
|
|
cursor: pointer;
|
|
line-height: 1;
|
|
}
|
|
|
|
.tool-textarea:focus,
|
|
.select-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-accent) !important;
|
|
box-shadow: 0 0 0 1px var(--primary-accent) !important;
|
|
}
|
|
|
|
.result-area {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 200px;
|
|
}
|
|
|
|
.result-area label {
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Common UI Element Styles */
|
|
.glass-panel {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--glass-shadow);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.glass-panel:not(.modal-content) {
|
|
background: transparent;
|
|
backdrop-filter: none;
|
|
-webkit-backdrop-filter: none;
|
|
border: none;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
.btn-neon {
|
|
background: var(--button-bg);
|
|
border: 1px solid var(--button-border);
|
|
color: var(--button-text);
|
|
padding: 0 1.25rem;
|
|
height: 40px;
|
|
border-radius: 8px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
outline: none;
|
|
/* Remove focus outline */
|
|
}
|
|
|
|
/* Global button styles */
|
|
button {
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
/* Remove focus outline for all buttons */
|
|
button:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.btn-neon:hover {
|
|
background: var(--button-hover-bg);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--button-hover-shadow);
|
|
border-color: var(--accent-cyan);
|
|
}
|
|
|
|
.btn-neon.primary {
|
|
background: var(--primary-accent);
|
|
color: #000;
|
|
border-color: var(--primary-accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn-neon.primary:hover {
|
|
background: var(--primary-accent);
|
|
opacity: 0.9;
|
|
box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
|
|
}
|
|
|
|
:root[data-theme="light"] .btn-neon.primary:hover {
|
|
box-shadow: 0 0 18px rgba(14, 165, 233, 0.4);
|
|
}
|
|
|
|
|
|
.btn-neon:active {
|
|
transform: translateY(1px);
|
|
box-shadow: var(--button-active-shadow);
|
|
}
|
|
|
|
.btn-neon.danger {
|
|
background: rgba(239, 68, 68, 0.2);
|
|
border-color: rgba(239, 68, 68, 0.6);
|
|
color: #fee2e2;
|
|
}
|
|
|
|
.btn-neon.danger:hover {
|
|
background: rgba(239, 68, 68, 0.3);
|
|
border-color: rgba(239, 68, 68, 0.85);
|
|
box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
|
|
}
|
|
|
|
:root[data-theme="light"] .btn-neon.danger {
|
|
color: #7f1d1d;
|
|
}
|
|
|
|
.icon-only {
|
|
padding: 8px;
|
|
border-radius: 50%;
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
.unselectable {
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
/* Ripple Effect */
|
|
span.ripple {
|
|
position: absolute;
|
|
border-radius: 50%;
|
|
transform: scale(0);
|
|
animation: ripple 600ms linear;
|
|
background-color: var(--ripple-color);
|
|
pointer-events: none;
|
|
}
|
|
|
|
@keyframes ripple {
|
|
to {
|
|
transform: scale(4);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* --- Global Input/Select Focus Styles --- */
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus,
|
|
button:focus {
|
|
outline: none;
|
|
}
|
|
|
|
button:focus-visible,
|
|
a:focus-visible {
|
|
outline: 2px solid var(--primary-accent);
|
|
outline-offset: 2px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus,
|
|
.number-control:focus-within {
|
|
border-color: var(--primary-accent) !important;
|
|
box-shadow: 0 0 0 1px var(--primary-accent) !important;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
/* --- Global Checkbox Styles --- */
|
|
.checkbox-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.checkbox-label:hover {
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.checkbox-label input {
|
|
position: absolute;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
height: 0;
|
|
width: 0;
|
|
}
|
|
|
|
.checkmark {
|
|
position: relative;
|
|
height: 20px;
|
|
width: 20px;
|
|
background-color: var(--toggle-bg);
|
|
border: 1px solid var(--toggle-border);
|
|
border-radius: 4px;
|
|
transition: all 0.3s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.checkbox-label:hover .checkmark {
|
|
border-color: var(--toggle-hover-border);
|
|
}
|
|
|
|
.checkbox-label input:checked~.checkmark {
|
|
background-color: var(--primary-accent);
|
|
border-color: var(--primary-accent);
|
|
box-shadow: 0 0 10px var(--primary-accent);
|
|
}
|
|
|
|
.checkmark:after {
|
|
content: "";
|
|
position: absolute;
|
|
display: none;
|
|
}
|
|
|
|
.checkbox-label input:checked~.checkmark:after {
|
|
display: block;
|
|
}
|
|
|
|
.checkbox-label .checkmark:after {
|
|
left: 6px;
|
|
top: 2px;
|
|
width: 5px;
|
|
height: 10px;
|
|
border: solid white;
|
|
border-width: 0 2px 2px 0;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
:root[data-theme="light"] .checkmark:after {
|
|
border-color: white;
|
|
/* Keep checkmark white even in light mode if background is primary-accent */
|
|
}
|
|
|
|
/* --- Global Header/Action Patterns --- */
|
|
.panel-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.8rem;
|
|
}
|
|
|
|
/* --- Global Icon Button Styles --- */
|
|
.icon-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
padding: 0.5rem;
|
|
border-radius: 8px;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.icon-btn:hover {
|
|
color: var(--text-color);
|
|
background: var(--button-hover-bg);
|
|
}
|
|
|
|
.icon-btn.delete-btn:hover {
|
|
color: #ef4444;
|
|
background: rgba(239, 68, 68, 0.1);
|
|
}
|
|
|
|
:root[data-theme="light"] .icon-btn.delete-btn:hover {
|
|
color: #dc2626;
|
|
background: rgba(220, 38, 38, 0.05);
|
|
}
|
|
|
|
/* --- Component Specific Theme Overrides (Consolidated) --- */
|
|
:root[data-theme="light"] .settings-btn {
|
|
background: rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
:root[data-theme="light"] .savings {
|
|
color: #16a34a;
|
|
font-weight: 500;
|
|
}
|
|
|
|
:root[data-theme="light"] .modal-overlay {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
:root[data-theme="light"] .add-rule-form,
|
|
:root[data-theme="light"] .rule-item {
|
|
background: rgba(0, 0, 0, 0.04);
|
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.detail-tag {
|
|
font-size: 0.8rem;
|
|
background: var(--list-hover-bg);
|
|
border: 1px solid var(--list-border);
|
|
padding: 0.2rem 0.5rem;
|
|
border-radius: 4px;
|
|
color: var(--text-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
/* --- Global Number Control Styles --- */
|
|
.number-control {
|
|
display: flex;
|
|
align-items: stretch;
|
|
background: var(--toggle-bg);
|
|
border: 1px solid var(--toggle-border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
height: auto;
|
|
min-height: 40px;
|
|
flex-wrap: wrap;
|
|
/* allow wrapping on very small screens */
|
|
}
|
|
|
|
.control-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-color);
|
|
font-size: 0.9rem;
|
|
min-width: 40px;
|
|
padding: 0 0.5rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.control-btn:hover {
|
|
background: var(--button-hover-bg);
|
|
color: var(--primary-accent);
|
|
}
|
|
|
|
.number-input {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-color);
|
|
flex: 1;
|
|
min-width: 40px;
|
|
text-align: center;
|
|
font-size: 1rem;
|
|
font-weight: 400;
|
|
appearance: textfield;
|
|
padding: 0.2rem;
|
|
}
|
|
|
|
.number-input::-webkit-outer-spin-button,
|
|
.number-input::-webkit-inner-spin-button {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
}
|
|
|
|
/* --- Global List/History Styles --- */
|
|
.results-section,
|
|
.history-section {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background: var(--glass-bg);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.history-header,
|
|
.results-header {
|
|
padding: 1rem;
|
|
border-bottom: 1px solid var(--glass-border);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.history-header h3,
|
|
.results-header h3 {
|
|
margin: 0;
|
|
font-size: 1.1rem;
|
|
color: var(--text-strong);
|
|
}
|
|
|
|
.history-actions,
|
|
.results-actions,
|
|
.header-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.history-list,
|
|
.codes-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 0;
|
|
}
|
|
|
|
.history-item,
|
|
.code-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
border-bottom: 1px solid var(--list-border);
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.history-item:last-child,
|
|
.code-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.history-item:hover,
|
|
.code-item:hover {
|
|
background: var(--list-hover-bg);
|
|
}
|
|
|
|
.item-info,
|
|
.code-content {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
.item-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: #4ade80;
|
|
box-shadow: 0 0 8px #4ade80;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
} |