668 lines
12 KiB
CSS
668 lines
12 KiB
CSS
.date-calculator-page {
|
|
min-height: 100vh;
|
|
background: #f0f2f5;
|
|
}
|
|
|
|
.date-calculator-hero {
|
|
min-height: 200px;
|
|
background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
overflow: hidden;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.date-calculator-hero::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
|
|
animation: dcHeroLight 8s ease-in-out infinite alternate;
|
|
}
|
|
|
|
@keyframes dcHeroLight {
|
|
0% { transform: translate(0, 0); }
|
|
100% { transform: translate(-20px, -10px); }
|
|
}
|
|
|
|
.date-calculator-hero-particles {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.dc-particle {
|
|
position: absolute;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.12);
|
|
animation: dcFloat 6s ease-in-out infinite;
|
|
}
|
|
|
|
.dc-particle-1 { width: 50px; height: 50px; top: 15%; left: 8%; animation-delay: 0s; }
|
|
.dc-particle-2 { width: 35px; height: 35px; top: 65%; left: 18%; animation-delay: 1s; }
|
|
.dc-particle-3 { width: 65px; height: 65px; top: 25%; right: 12%; animation-delay: 2s; }
|
|
.dc-particle-4 { width: 25px; height: 25px; top: 70%; right: 25%; animation-delay: 0.5s; }
|
|
.dc-particle-5 { width: 40px; height: 40px; top: 45%; left: 45%; animation-delay: 1.5s; }
|
|
.dc-particle-6 { width: 30px; height: 30px; bottom: 20%; left: 30%; animation-delay: 3s; }
|
|
|
|
@keyframes dcFloat {
|
|
0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
|
|
50% { transform: translateY(-18px) scale(1.1); opacity: 0.6; }
|
|
}
|
|
|
|
.date-calculator-hero-content {
|
|
text-align: center;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.date-calculator-hero-icon {
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 20px;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(10px);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 28px;
|
|
color: #fff;
|
|
margin-bottom: 16px;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.date-calculator-hero-title {
|
|
font-size: 32px;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
margin: 0;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.dc-title-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.dc-hero-fav {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.date-calculator-container {
|
|
max-width: 1100px;
|
|
margin: -30px auto 0;
|
|
padding: 0 20px 60px;
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.dc-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
margin-bottom: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.dc-back-btn {
|
|
border-radius: 8px;
|
|
font-weight: 500;
|
|
color: #64748b;
|
|
border-color: #e2e8f0;
|
|
}
|
|
|
|
.dc-back-btn:hover {
|
|
color: #8b5cf6;
|
|
border-color: #8b5cf6;
|
|
}
|
|
|
|
.dc-timezone-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
padding: 10px 16px;
|
|
border: 1px solid #e8ecf1;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.dc-timezone-label {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #334155;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dc-timezone-select {
|
|
min-width: 220px;
|
|
}
|
|
|
|
.dc-panels {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 20px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.dc-panel {
|
|
background: #fff;
|
|
border-radius: 14px;
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
|
|
border: 1px solid #e8ecf1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: box-shadow 0.3s ease;
|
|
}
|
|
|
|
.dc-panel:hover {
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.dc-panel-header {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: #fafbfc;
|
|
}
|
|
|
|
.dc-panel-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #334155;
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.dc-panel-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: #cbd5e1;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
.dc-panel-dot.input-dot {
|
|
background: #8b5cf6;
|
|
}
|
|
|
|
.dc-panel-dot.output-dot {
|
|
background: #10b981;
|
|
}
|
|
|
|
.dc-panel-body {
|
|
flex: 1;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.dc-input-area {
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
background: #1e1e2e;
|
|
color: #a6e3a1;
|
|
border: 2px solid #2a2a3e;
|
|
border-radius: 10px;
|
|
outline: none;
|
|
transition: border-color 0.3s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.dc-input-area::placeholder {
|
|
color: #6c7086;
|
|
}
|
|
|
|
.dc-input-area:focus {
|
|
border-color: #8b5cf6;
|
|
}
|
|
|
|
.dc-date-picker {
|
|
width: 100%;
|
|
}
|
|
|
|
.dc-date-picker .ant-picker {
|
|
width: 100%;
|
|
border-radius: 10px;
|
|
padding: 10px 14px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.dc-badge {
|
|
display: inline-block;
|
|
padding: 2px 10px;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.dc-badge-seconds {
|
|
background: #ede9fe;
|
|
color: #7c3aed;
|
|
}
|
|
|
|
.dc-badge-milliseconds {
|
|
background: #dbeafe;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.dc-mode-toggle {
|
|
display: flex;
|
|
gap: 0;
|
|
}
|
|
|
|
.dc-mode-toggle .ant-btn:first-child {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
|
|
.dc-mode-toggle .ant-btn:last-child {
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
margin-left: -1px;
|
|
}
|
|
|
|
.dc-results {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.dc-result-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: #f8fafc;
|
|
border: 1px solid #e8ecf1;
|
|
border-radius: 10px;
|
|
padding: 10px 14px;
|
|
transition: all 0.2s ease;
|
|
animation: dcFadeIn 0.3s ease;
|
|
}
|
|
|
|
.dc-result-item:hover {
|
|
background: #f1f5f9;
|
|
border-color: #c7d2fe;
|
|
}
|
|
|
|
@keyframes dcFadeIn {
|
|
from { opacity: 0; transform: translateY(6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.dc-result-label {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: #64748b;
|
|
min-width: 80px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.dc-result-value {
|
|
font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
|
|
font-size: 13px;
|
|
color: #1e293b;
|
|
word-break: break-all;
|
|
flex: 1;
|
|
margin: 0 12px;
|
|
}
|
|
|
|
.dc-result-copy {
|
|
flex-shrink: 0;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 6px;
|
|
border: 1px solid #e2e8f0;
|
|
background: #fff;
|
|
color: #94a3b8;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 13px;
|
|
transition: all 0.2s ease;
|
|
padding: 0;
|
|
}
|
|
|
|
.dc-result-copy:hover {
|
|
color: #8b5cf6;
|
|
border-color: #c4b5fd;
|
|
background: #f5f3ff;
|
|
}
|
|
|
|
.dc-result-copy.copied {
|
|
color: #10b981;
|
|
border-color: #6ee7b7;
|
|
background: #ecfdf5;
|
|
}
|
|
|
|
.dc-empty-hint {
|
|
text-align: center;
|
|
padding: 40px 16px;
|
|
color: #94a3b8;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.dc-empty-hint-icon {
|
|
font-size: 36px;
|
|
color: #cbd5e1;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.dc-actions {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.dc-action-btn {
|
|
height: 48px;
|
|
border-radius: 12px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.dc-action-get {
|
|
background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
|
|
border: none !important;
|
|
color: #fff !important;
|
|
box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
|
|
}
|
|
|
|
.dc-action-get:hover {
|
|
box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45) !important;
|
|
}
|
|
|
|
.dc-action-clear {
|
|
background: #fff !important;
|
|
color: #ef4444 !important;
|
|
border-color: #ef4444 !important;
|
|
}
|
|
|
|
.dc-action-clear:hover {
|
|
background: #fef2f2 !important;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.date-calculator-hero {
|
|
min-height: 120px;
|
|
padding: 24px 16px;
|
|
}
|
|
|
|
.date-calculator-hero-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
font-size: 22px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.date-calculator-hero-title {
|
|
font-size: 20px;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.dc-title-row {
|
|
gap: 8px;
|
|
}
|
|
|
|
.date-calculator-container {
|
|
padding: 0 12px 40px;
|
|
margin-top: -20px;
|
|
}
|
|
|
|
.dc-toolbar {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.dc-back-btn {
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
|
|
.dc-timezone-bar {
|
|
flex-wrap: wrap;
|
|
padding: 8px 12px;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.dc-timezone-label {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.dc-timezone-select {
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.dc-panels {
|
|
grid-template-columns: 1fr;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.dc-panel-header {
|
|
padding: 10px 12px;
|
|
}
|
|
|
|
.dc-panel-title {
|
|
font-size: 13px;
|
|
}
|
|
|
|
.dc-panel-body {
|
|
padding: 12px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.dc-input-area {
|
|
font-size: 16px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.dc-date-picker .ant-picker {
|
|
padding: 8px 12px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.dc-result-item {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.dc-result-label {
|
|
min-width: 0;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.dc-result-value {
|
|
margin: 0;
|
|
width: 100%;
|
|
font-size: 14px;
|
|
word-break: break-all;
|
|
padding: 8px;
|
|
background: #f1f5f9;
|
|
border-radius: 6px;
|
|
order: 0;
|
|
}
|
|
|
|
.dc-result-copy {
|
|
align-self: flex-end;
|
|
width: 36px;
|
|
height: 36px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.dc-mode-toggle {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.dc-mode-toggle .ant-btn {
|
|
padding: 4px 12px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.dc-empty-hint {
|
|
padding: 24px 12px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.dc-empty-hint-icon {
|
|
font-size: 28px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.dc-actions {
|
|
grid-template-columns: 1fr;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.dc-action-btn {
|
|
height: 52px;
|
|
font-size: 16px;
|
|
border-radius: 10px;
|
|
}
|
|
}
|
|
|
|
/* ===== Dark Mode ===== */
|
|
[data-theme="dark"] .date-calculator-page {
|
|
background: #0f172a;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-panel {
|
|
background: #1e293b;
|
|
border-color: #334155;
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-panel:hover {
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-panel-header {
|
|
background: rgba(139, 92, 246, 0.08);
|
|
border-color: #334155;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-panel-title {
|
|
color: #f1f5f9;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-panel-dot {
|
|
background: #475569;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-back-btn {
|
|
color: #94a3b8 !important;
|
|
border-color: #334155 !important;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-back-btn:hover {
|
|
color: #8b5cf6 !important;
|
|
border-color: #8b5cf6 !important;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-timezone-bar {
|
|
background: #1e293b;
|
|
border-color: #334155;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-timezone-label {
|
|
color: #f1f5f9;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-item {
|
|
background: rgba(30, 41, 59, 0.6);
|
|
border-color: #334155;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-item:hover {
|
|
background: rgba(139, 92, 246, 0.1);
|
|
border-color: #8b5cf6;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-label {
|
|
color: #94a3b8;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-value {
|
|
color: #f1f5f9;
|
|
background: rgba(51, 65, 85, 0.5);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-copy {
|
|
background: #1e293b;
|
|
border-color: #334155;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-copy:hover {
|
|
color: #8b5cf6;
|
|
border-color: #8b5cf6;
|
|
background: rgba(139, 92, 246, 0.1);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-result-copy.copied {
|
|
color: #10b981;
|
|
border-color: #10b981;
|
|
background: rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
[data-theme="dark"] .dc-badge-seconds {
|
|
background: rgba(139, 92, 246, 0.15);
|
|
color: #a78bfa;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-badge-milliseconds {
|
|
background: rgba(59, 130, 246, 0.15);
|
|
color: #60a5fa;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-empty-hint-icon {
|
|
color: #475569;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-action-clear {
|
|
background: #1e293b !important;
|
|
color: #f87171 !important;
|
|
border-color: #f87171 !important;
|
|
}
|
|
|
|
[data-theme="dark"] .dc-action-clear:hover {
|
|
background: rgba(239, 68, 68, 0.1) !important;
|
|
}
|