collective-boredom-dial/src/App.css

931 lines
16 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
min-height: 100vh;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.app {
min-height: 100vh;
display: flex;
flex-direction: column;
color: #ffffff;
padding: 1rem;
max-width: 1200px;
margin: 0 auto;
}
.app-header {
text-align: center;
padding: 1.5rem 1rem 1rem;
}
.app-header h1 {
font-size: clamp(1.4rem, 4vw, 2.2rem);
font-weight: 700;
background: linear-gradient(135deg, #a855f7, #6366f1);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.25rem;
}
.subtitle {
font-size: 0.9rem;
color: #a1a1aa;
}
/* Main content area */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 2rem;
}
/* Main dials row - side by side */
.dials-row {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
padding: 1rem 0;
}
@media (min-width: 700px) {
.dials-row {
gap: 2rem;
flex-wrap: nowrap;
}
}
.dial-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.dial-container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
.dial-label {
font-size: 0.9rem;
font-weight: 600;
color: #e4e4e7;
margin-top: 0.5rem;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.dial-hint {
font-size: 0.75rem;
color: #71717a;
text-align: center;
}
/* Connector between dials */
.dial-connector {
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
padding: 0 0.5rem;
}
@media (max-width: 699px) {
.dial-connector {
flex-direction: column;
padding: 0.5rem 0;
}
}
.connector-line {
width: 30px;
height: 2px;
background: linear-gradient(90deg, transparent, #6366f1, transparent);
opacity: 0.5;
}
@media (max-width: 699px) {
.connector-line {
width: 2px;
height: 20px;
background: linear-gradient(180deg, transparent, #6366f1, transparent);
}
}
.contribution-badge {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.5rem 1rem;
background: rgba(99, 102, 241, 0.15);
border: 1px solid rgba(99, 102, 241, 0.3);
border-radius: 0.75rem;
}
.contribution-value {
font-size: 1.25rem;
font-weight: 700;
color: #a855f7;
}
.contribution-label {
font-size: 0.65rem;
color: #a1a1aa;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.user-count-badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.35rem 0.75rem;
background: rgba(139, 92, 246, 0.15);
border: 1px solid rgba(139, 92, 246, 0.25);
border-radius: 1rem;
font-size: 0.8rem;
color: #c4b5fd;
}
/* Participants section */
.participants-section {
padding: 1rem;
background: rgba(255, 255, 255, 0.02);
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.05);
}
.participants-title {
font-size: 0.85rem;
font-weight: 600;
color: #a1a1aa;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-bottom: 1rem;
text-align: center;
}
.participants-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 1rem;
}
/* Mini dial styles */
.mini-dial {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.5rem;
border-radius: 0.75rem;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.05);
transition: all 0.2s ease;
}
.mini-dial:hover {
background: rgba(255, 255, 255, 0.05);
}
.mini-dial.is-you {
background: rgba(99, 102, 241, 0.1);
border-color: rgba(99, 102, 241, 0.3);
}
.mini-dial.is-bot {
opacity: 0.85;
}
.mini-dial svg {
display: block;
}
.mini-dial-label {
font-size: 0.7rem;
color: #a1a1aa;
margin-top: 0.25rem;
display: flex;
align-items: center;
gap: 0.25rem;
}
.mini-dial.is-you .mini-dial-label {
color: #c4b5fd;
font-weight: 600;
}
.bot-badge {
font-size: 0.55rem;
padding: 0.1rem 0.3rem;
background: rgba(139, 92, 246, 0.2);
border-radius: 0.25rem;
color: #a78bfa;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Footer */
.app-footer {
text-align: center;
padding: 1rem;
margin-top: auto;
}
.status-message {
font-size: 0.7rem;
color: #22c55e;
margin-bottom: 0.25rem;
}
.status-message.error {
color: #f97316;
}
.credits {
font-size: 0.75rem;
color: #52525b;
font-style: italic;
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dial-section {
animation: fadeIn 0.5s ease-out forwards;
}
.dial-section.individual {
animation-delay: 0.1s;
}
.dial-section.global {
animation-delay: 0.2s;
}
.participants-section {
animation: fadeIn 0.5s ease-out forwards;
animation-delay: 0.3s;
}
/* SVG interaction */
.dial-section.individual svg {
cursor: pointer;
}
.dial-section.individual svg:hover {
filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3));
}
.dial-section.global svg {
filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.15));
}
/* Touch feedback */
@media (hover: none) {
.dial-section.individual svg:active {
transform: scale(0.98);
}
}
/* Responsive adjustments */
@media (max-width: 500px) {
.dial-section.individual .dial-container svg {
width: 200px;
height: 200px;
}
.dial-section.global .dial-container svg {
width: 220px;
height: 220px;
}
.mini-dial svg {
width: 70px;
height: 70px;
}
}
/* ==================== HOME PAGE ==================== */
.home-content {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
}
.home-options {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
max-width: 400px;
}
.home-card {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 1rem;
padding: 1.5rem;
text-align: center;
}
.home-card h2 {
font-size: 1.1rem;
font-weight: 600;
color: #e4e4e7;
margin-bottom: 0.5rem;
}
.home-card p {
font-size: 0.85rem;
color: #71717a;
margin-bottom: 1rem;
}
.home-divider {
display: flex;
align-items: center;
gap: 1rem;
}
.home-divider::before,
.home-divider::after {
content: '';
flex: 1;
height: 1px;
background: rgba(255, 255, 255, 0.1);
}
.home-divider span {
font-size: 0.75rem;
color: #52525b;
text-transform: uppercase;
}
/* Buttons */
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 0.5rem;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary {
background: linear-gradient(135deg, #6366f1, #a855f7);
color: white;
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.08);
color: #e4e4e7;
border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-secondary:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.12);
}
.btn-large {
padding: 1rem 2rem;
font-size: 1rem;
}
/* Input fields */
.input-field {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 0.5rem;
background: rgba(0, 0, 0, 0.3);
color: #ffffff;
font-size: 0.9rem;
margin-bottom: 0.75rem;
outline: none;
transition: border-color 0.2s ease;
}
.input-field:focus {
border-color: #6366f1;
}
.input-field::placeholder {
color: #52525b;
}
.room-code-input {
font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
font-size: 1.2rem;
text-align: center;
letter-spacing: 0.3em;
}
.error-message {
color: #f97316;
font-size: 0.85rem;
margin-top: 1rem;
text-align: center;
}
/* ==================== ROOM HEADER ==================== */
.app-header {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.header-content {
flex: 1;
text-align: center;
}
.back-btn,
.share-btn {
position: absolute;
padding: 0.5rem 1rem;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 0.5rem;
color: #a1a1aa;
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.back-btn {
left: 0;
}
.share-btn {
right: 0;
}
.back-btn:hover,
.share-btn:hover {
background: rgba(255, 255, 255, 0.12);
color: #e4e4e7;
}
.room-code-display {
font-size: 0.8rem;
color: #a78bfa;
font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
letter-spacing: 0.1em;
}
/* ==================== SHARE MODAL ==================== */
.share-modal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
animation: fadeIn 0.2s ease-out;
}
.share-content {
background: #1e1e2e;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 1rem;
padding: 2rem;
max-width: 350px;
width: 100%;
text-align: center;
}
.share-content h3 {
font-size: 1.2rem;
font-weight: 600;
color: #e4e4e7;
margin-bottom: 1.5rem;
}
.qr-container {
background: #1e1e2e;
padding: 1rem;
border-radius: 0.75rem;
display: inline-block;
margin-bottom: 1rem;
}
.share-code {
font-size: 1rem;
color: #a1a1aa;
margin-bottom: 1rem;
}
.share-code strong {
font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
color: #a78bfa;
font-size: 1.2rem;
letter-spacing: 0.2em;
}
.share-url {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
.share-url input {
flex: 1;
padding: 0.5rem 0.75rem;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 0.375rem;
background: rgba(0, 0, 0, 0.3);
color: #a1a1aa;
font-size: 0.75rem;
outline: none;
}
.share-url button {
padding: 0.5rem 1rem;
background: #6366f1;
border: none;
border-radius: 0.375rem;
color: white;
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: background 0.2s ease;
}
.share-url button:hover {
background: #4f46e5;
}
.close-btn {
margin-top: 0.5rem;
}
/* ==================== MOBILE VIEW ==================== */
.mobile-app {
padding: 0.5rem;
}
.app-header.compact {
padding: 1rem 0.5rem;
}
.app-header.compact h1 {
font-size: 1.2rem;
}
.user-count-inline {
font-size: 0.75rem;
color: #a1a1aa;
}
.join-content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
}
.join-form {
width: 100%;
max-width: 300px;
display: flex;
flex-direction: column;
gap: 1rem;
}
.mobile-content {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2rem;
padding: 1rem;
}
.mobile-dial-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
}
.mobile-collective {
width: 100%;
max-width: 280px;
}
.collective-preview {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.2);
border-radius: 1rem;
}
.collective-label {
font-size: 0.9rem;
color: #a1a1aa;
}
.collective-value {
font-size: 2rem;
font-weight: 700;
color: #a78bfa;
}
/* Mobile-specific touch optimizations */
@media (max-width: 500px) {
.mobile-dial-section .dial-container svg {
width: 260px;
height: 260px;
}
}
@media (hover: none) and (pointer: coarse) {
.btn {
padding: 1rem 1.5rem;
}
.input-field {
padding: 1rem;
font-size: 1rem;
}
}
/* ==================== VETO SPEAKER ==================== */
.veto-section {
width: 100%;
max-width: 400px;
margin: 1.5rem auto;
padding: 1.5rem;
border-radius: 1rem;
text-align: center;
animation: vetoSlideIn 0.3s ease-out;
}
@keyframes vetoSlideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Veto Available State */
.veto-available {
background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(239, 68, 68, 0.15));
border: 1px solid rgba(251, 146, 60, 0.3);
}
.veto-alert {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.veto-icon {
font-size: 1.5rem;
animation: vietoPulse 1s ease-in-out infinite;
}
@keyframes vietoPulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
.veto-message {
font-size: 1rem;
font-weight: 600;
color: #fb923c;
}
.btn-veto {
background: linear-gradient(135deg, #fb923c, #ef4444);
color: white;
font-size: 1.1rem;
padding: 1rem 2rem;
border: none;
border-radius: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
animation: vetoPulse 2s ease-in-out infinite;
}
@keyframes vetoPulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.4); }
50% { box-shadow: 0 0 20px 5px rgba(251, 146, 60, 0.2); }
}
.btn-veto:hover {
transform: translateY(-2px) scale(1.02);
box-shadow: 0 8px 25px rgba(251, 146, 60, 0.4);
}
/* Veto Active (Voting) State */
.veto-active {
background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
border: 2px solid rgba(139, 92, 246, 0.5);
animation: vetoSlideIn 0.3s ease-out, vetoBorder 1s ease-in-out infinite;
}
@keyframes vetoBorder {
0%, 100% { border-color: rgba(139, 92, 246, 0.5); }
50% { border-color: rgba(236, 72, 153, 0.5); }
}
.veto-voting {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.veto-title {
font-size: 1.3rem;
font-weight: 700;
color: #e4e4e7;
margin: 0;
}
.veto-initiator {
font-size: 0.9rem;
color: #a1a1aa;
margin: 0;
}
.veto-progress {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.veto-bar {
height: 12px;
background: rgba(0, 0, 0, 0.3);
border-radius: 6px;
overflow: hidden;
}
.veto-bar-fill {
height: 100%;
background: linear-gradient(90deg, #a78bfa, #ec4899);
border-radius: 6px;
transition: width 0.3s ease;
}
.veto-count {
font-size: 0.85rem;
color: #c4b5fd;
font-weight: 500;
}
.veto-timer {
font-size: 1.2rem;
font-weight: 700;
color: #fbbf24;
animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.btn-vote {
background: linear-gradient(135deg, #a78bfa, #ec4899);
color: white;
font-size: 1.1rem;
padding: 1rem 2rem;
border: none;
border-radius: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
margin-top: 0.5rem;
}
.btn-vote:hover {
transform: scale(1.05);
box-shadow: 0 8px 25px rgba(167, 139, 250, 0.4);
}
/* Veto Result States */
.veto-result {
padding: 2rem;
}
.veto-result-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.veto-result-icon {
font-size: 3rem;
animation: resultBounce 0.5s ease-out;
}
@keyframes resultBounce {
0% { transform: scale(0); }
50% { transform: scale(1.2); }
100% { transform: scale(1); }
}
.veto-result h3 {
font-size: 1.5rem;
font-weight: 700;
margin: 0;
}
.veto-result p {
font-size: 0.9rem;
color: #a1a1aa;
margin: 0;
}
.veto-passed {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
border: 2px solid rgba(239, 68, 68, 0.5);
}
.veto-passed h3 {
color: #f87171;
}
.veto-failed {
background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.2));
border: 2px solid rgba(34, 197, 94, 0.4);
}
.veto-failed h3 {
color: #4ade80;
}
/* Mobile adjustments for veto */
@media (max-width: 500px) {
.veto-section {
margin: 1rem auto;
padding: 1rem;
}
.veto-title {
font-size: 1.1rem;
}
.btn-veto,
.btn-vote {
padding: 0.875rem 1.5rem;
font-size: 1rem;
}
}