warp-drop / static /style.css
trung.le
update: UI tuning
55fc1f9
Raw
History Blame Contribute Delete
16.9 kB
/* ========================================
WarpDrop - Translucent Theme System
======================================== */
:root {
/* Base colors - will be overridden by theme */
--primary: 210, 100%, 80%;
--primary-dark: 210, 100%, 60%;
/* Light mode defaults */
--bg-start: hsl(var(--primary), 0.1);
--bg-end: hsl(calc(var(--primary) + 40), 100%, 90%);
--surface: rgba(255, 255, 255, 0.7);
--surface-hover: rgba(255, 255, 255, 0.85);
--text: #1a1a2e;
--text-secondary: #4a4a6a;
--border: rgba(255, 255, 255, 0.5);
--shadow: rgba(0, 0, 0, 0.1);
--glass-blur: 20px;
}
[data-theme="dark"] {
--bg-start: hsl(var(--primary), 0.05);
--bg-end: hsl(220, 20%, 10%);
--surface: rgba(30, 30, 50, 0.7);
--surface-hover: rgba(40, 40, 65, 0.85);
--text: #f0f0f5;
--text-secondary: #cbd5e1;
--border: rgba(255, 255, 255, 0.15);
--shadow: rgba(0, 0, 0, 0.3);
}
/* Pastel Color Themes - 24 colors */
[data-color="rose"] {
--primary: 350, 100%, 80%;
--primary-dark: 350, 80%, 65%;
}
[data-color="pink"] {
--primary: 330, 100%, 82%;
--primary-dark: 330, 80%, 67%;
}
[data-color="fuchsia"] {
--primary: 300, 90%, 80%;
--primary-dark: 300, 70%, 65%;
}
[data-color="purple"] {
--primary: 280, 85%, 78%;
--primary-dark: 280, 65%, 63%;
}
[data-color="violet"] {
--primary: 260, 90%, 80%;
--primary-dark: 260, 70%, 65%;
}
[data-color="indigo"] {
--primary: 240, 80%, 78%;
--primary-dark: 240, 60%, 63%;
}
[data-color="blue"] {
--primary: 210, 100%, 80%;
--primary-dark: 210, 80%, 65%;
}
[data-color="sky"] {
--primary: 195, 100%, 78%;
--primary-dark: 195, 80%, 60%;
}
[data-color="cyan"] {
--primary: 180, 85%, 75%;
--primary-dark: 180, 65%, 55%;
}
[data-color="teal"] {
--primary: 165, 80%, 72%;
--primary-dark: 165, 60%, 52%;
}
[data-color="emerald"] {
--primary: 150, 80%, 75%;
--primary-dark: 150, 60%, 55%;
}
[data-color="green"] {
--primary: 130, 70%, 75%;
--primary-dark: 130, 50%, 55%;
}
[data-color="lime"] {
--primary: 90, 80%, 78%;
--primary-dark: 90, 60%, 55%;
}
[data-color="yellow"] {
--primary: 50, 100%, 80%;
--primary-dark: 50, 80%, 60%;
}
[data-color="amber"] {
--primary: 40, 100%, 78%;
--primary-dark: 40, 80%, 58%;
}
[data-color="orange"] {
--primary: 25, 100%, 78%;
--primary-dark: 25, 80%, 60%;
}
[data-color="coral"] {
--primary: 15, 100%, 80%;
--primary-dark: 15, 80%, 65%;
}
[data-color="red"] {
--primary: 5, 90%, 78%;
--primary-dark: 5, 70%, 60%;
}
[data-color="stone"] {
--primary: 30, 20%, 75%;
--primary-dark: 30, 15%, 55%;
}
[data-color="slate"] {
--primary: 210, 20%, 75%;
--primary-dark: 210, 15%, 55%;
}
[data-color="zinc"] {
--primary: 240, 10%, 78%;
--primary-dark: 240, 8%, 58%;
}
[data-color="mint"] {
--primary: 160, 60%, 80%;
--primary-dark: 160, 45%, 60%;
}
[data-color="lavender"] {
--primary: 270, 60%, 82%;
--primary-dark: 270, 45%, 67%;
}
[data-color="peach"] {
--primary: 20, 100%, 85%;
--primary-dark: 20, 80%, 70%;
}
/* ========================================
Global Styles
======================================== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
min-height: 100vh;
background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
background-attachment: fixed;
color: var(--text);
transition: background 0.5s ease, color 0.3s ease;
overflow-x: hidden;
}
/* Animated background blobs */
body::before,
body::after {
content: '';
position: fixed;
border-radius: 50%;
filter: blur(80px);
opacity: 0.4;
z-index: -1;
animation: float 20s ease-in-out infinite;
}
body::before {
width: 500px;
height: 500px;
background: hsl(var(--primary));
top: -200px;
left: -100px;
}
body::after {
width: 400px;
height: 400px;
background: hsl(calc(var(--primary) + 60), 80%, 75%);
bottom: -150px;
right: -100px;
animation-delay: -10s;
}
@keyframes float {
0%,
100% {
transform: translate(0, 0) scale(1);
}
25% {
transform: translate(30px, -30px) scale(1.05);
}
50% {
transform: translate(-20px, 20px) scale(0.95);
}
75% {
transform: translate(20px, 30px) scale(1.02);
}
}
/* ========================================
Glass Card Component
======================================== */
.glass {
background: var(--surface);
backdrop-filter: blur(var(--glass-blur));
-webkit-backdrop-filter: blur(var(--glass-blur));
border: 1px solid var(--border);
border-radius: 24px;
box-shadow: 0 8px 32px var(--shadow);
transition: all 0.3s ease;
}
.glass:hover {
background: var(--surface-hover);
transform: translateY(-2px);
box-shadow: 0 12px 40px var(--shadow);
}
/* ========================================
Layout
======================================== */
.app-container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
header {
text-align: center;
padding: 20px 0 10px 0;
display: flex;
flex-direction: column;
align-items: center;
}
.logo-container {
margin-bottom: 0px;
display: flex;
justify-content: center;
width: 100%;
}
.main-logo {
max-width: 280px;
height: auto;
}
.logo-text-warp {
fill: #1e293b;
}
[data-theme="dark"] .logo-text-warp {
fill: #f1f5f9;
}
.tagline {
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 500;
letter-spacing: 0.01em;
text-align: center;
margin-top: -6px;
margin-bottom: 24px;
/* Space between slogan and the box below */
}
[data-theme="dark"] .tagline {
color: #cbd5e1;
/* Brighter Slate for better contrast in dark mode */
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
main {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
/* ========================================
Settings Bar
======================================== */
.settings-bar {
display: flex;
justify-content: center;
gap: 12px;
padding: 16px;
margin-bottom: 10px;
position: relative;
z-index: 50;
}
/* Disable hover transform on settings-bar to prevent color palette shifting */
.settings-bar.glass:hover {
transform: none;
}
.theme-toggle {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 12px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
}
.theme-toggle svg {
width: 18px;
height: 18px;
}
/* Color Picker */
.color-picker-btn {
position: relative;
padding: 8px 14px;
border-radius: 12px;
cursor: pointer;
display: flex;
align-items: center;
gap: 10px;
font-size: 0.9rem;
font-weight: 500;
border: none;
background: var(--surface);
}
.color-preview {
width: 24px;
height: 24px;
border-radius: 50%;
background: linear-gradient(135deg, hsl(var(--primary-dark)), hsl(var(--primary)));
border: 2px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.color-palette {
position: absolute;
top: calc(100% + 12px);
right: 0;
padding: 16px;
border-radius: 20px;
display: none;
grid-template-columns: repeat(6, 1fr);
gap: 10px;
z-index: 1000;
min-width: 280px;
/* Translucent glassmorphism effect */
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .color-palette {
background: rgba(30, 30, 50, 0.9);
border: 1px solid rgba(255, 255, 255, 0.15);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.color-palette::before {
content: '';
position: absolute;
top: -8px;
right: 24px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .color-palette::before {
border-bottom-color: rgba(30, 30, 50, 0.9);
}
.color-palette.show {
display: grid;
animation: fadeIn 0.2s ease;
}
.color-swatch {
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
border: 3px solid transparent;
transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.color-swatch:hover {
transform: scale(1.2);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.color-swatch.active {
border-color: var(--text);
transform: scale(1.15);
box-shadow: 0 0 0 2px var(--surface), 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* ========================================
Room Section
======================================== */
.room-section {
padding: 32px;
}
/* Disable hover transform when color palette is showing */
.room-section.glass:hover {
transform: none;
}
.room-actions {
display: flex;
flex-direction: column;
gap: 16px;
}
.btn {
padding: 16px 24px;
border: none;
border-radius: 16px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.btn-primary {
background: linear-gradient(135deg, hsl(var(--primary-dark)) 0%, hsl(var(--primary)) 100%);
color: white;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px hsla(var(--primary-dark), 0.4);
}
.btn-secondary {
background: var(--surface);
color: var(--text);
border: 2px solid hsl(var(--primary));
}
.btn-secondary:hover {
background: hsl(var(--primary), 0.2);
}
.input-group {
display: flex;
gap: 12px;
}
.input-group input {
flex: 1;
padding: 16px 20px;
border: 2px solid var(--border);
border-radius: 16px;
background: var(--surface);
color: var(--text);
font-size: 1.1rem;
text-align: center;
letter-spacing: 4px;
font-weight: 600;
text-transform: uppercase;
}
.input-group input::placeholder {
letter-spacing: 1px;
text-transform: none;
font-weight: 400;
}
.input-group input:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* ========================================
Connected State
======================================== */
.room-connected {
display: none;
}
.room-connected.active {
display: block;
}
.room-info {
padding: 32px;
text-align: center;
}
.room-code-display {
font-size: 2.5rem;
font-weight: 800;
letter-spacing: 8px;
color: hsl(var(--primary-dark));
margin: 16px 0;
}
.connection-status {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--text-secondary);
margin-bottom: 20px;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #fbbf24;
animation: pulse 2s infinite;
}
.status-dot.connected {
background: #22c55e;
animation: none;
}
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.share-link {
display: flex;
gap: 8px;
margin-top: 16px;
}
.share-link input {
flex: 1;
padding: 12px 16px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
color: var(--text);
font-size: 0.85rem;
}
.share-link button {
padding: 12px 20px;
border-radius: 12px;
background: hsl(var(--primary));
color: white;
border: none;
cursor: pointer;
font-weight: 600;
}
/* ========================================
File Transfer Section
======================================== */
.transfer-section {
padding: 32px;
display: none;
}
.transfer-section.active {
display: block;
}
.drop-zone {
border: 3px dashed var(--border);
border-radius: 20px;
padding: 48px 24px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
}
.drop-zone:hover,
.drop-zone.dragover {
border-color: hsl(var(--primary));
background: hsl(var(--primary), 0.1);
}
.drop-zone-icon {
font-size: 3rem;
margin-bottom: 16px;
}
.drop-zone h3 {
font-size: 1.2rem;
margin-bottom: 8px;
}
.drop-zone p {
color: var(--text-secondary);
font-size: 0.9rem;
}
/* Progress */
.transfer-progress {
display: none;
padding: 24px;
margin-top: 20px;
}
.transfer-progress.active {
display: block;
}
.file-info {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
}
.file-icon {
width: 48px;
height: 48px;
background: hsl(var(--primary), 0.2);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
.file-details {
flex: 1;
}
.file-name {
font-weight: 600;
margin-bottom: 4px;
word-break: break-all;
}
.file-size {
color: var(--text-secondary);
font-size: 0.85rem;
}
.progress-bar {
height: 12px;
background: var(--border);
border-radius: 6px;
overflow: hidden;
margin-bottom: 12px;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, hsl(var(--primary-dark)), hsl(var(--primary)));
border-radius: 6px;
transition: width 0.3s ease;
position: relative;
}
.progress-fill::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
.progress-stats {
display: flex;
justify-content: space-between;
color: var(--text-secondary);
font-size: 0.85rem;
}
.transfer-mode {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: hsl(var(--primary), 0.2);
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
margin-top: 12px;
}
/* ========================================
Received Files
======================================== */
.received-files {
padding: 24px;
margin-top: 20px;
display: none;
}
.received-files.active {
display: block;
}
.received-files h3 {
margin-bottom: 16px;
font-size: 1rem;
}
.file-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.file-item {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
background: var(--surface);
border-radius: 12px;
}
.file-item .file-icon {
width: 40px;
height: 40px;
font-size: 1.2rem;
}
.file-item .file-details {
flex: 1;
}
.download-btn {
padding: 10px 16px;
background: hsl(var(--primary));
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 600;
transition: transform 0.2s;
}
.download-btn:hover {
transform: scale(1.05);
}
/* ========================================
Footer
======================================== */
footer {
text-align: center;
padding: 24px;
color: var(--text-secondary);
font-size: 0.85rem;
}
footer a {
color: hsl(var(--primary-dark));
text-decoration: none;
}
/* ========================================
Responsive
======================================== */
@media (max-width: 480px) {
.app-container {
padding: 12px;
}
.logo {
font-size: 2rem;
}
.glass {
border-radius: 20px;
padding: 24px;
}
.room-code-display {
font-size: 2rem;
letter-spacing: 6px;
}
.color-palette {
grid-template-columns: repeat(4, 1fr);
min-width: 180px;
}
}
/* ========================================
Animations
======================================== */
.fade-in {
animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-up {
animation: slideUp 0.4s ease;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Screen reader only */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}