Refactor ALL

This commit is contained in:
2025-09-04 14:31:17 +02:00
parent f6cd5c734f
commit eb1d713942
12 changed files with 2933 additions and 3039 deletions

684
public/css/dashboard.css Normal file
View File

@@ -0,0 +1,684 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: #0a0a0f;
color: #ffffff;
min-height: 100vh;
background-image:
radial-gradient(circle at 20% 80%, #1a1a2e 0%, transparent 50%),
radial-gradient(circle at 80% 20%, #16213e 0%, transparent 50%),
radial-gradient(circle at 40% 40%, #0f3460 0%, transparent 50%);
}
.main-container {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
}
.header-section {
text-align: center;
margin-bottom: 3rem;
}
.main-title {
font-size: 4rem;
font-weight: 700;
background: linear-gradient(135deg, #00d4ff, #ff6b35, #ffd700);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
}
.tagline {
font-size: 1.2rem;
color: #8892b0;
font-weight: 300;
}
.nav-buttons {
position: fixed;
top: 2rem;
right: 2rem;
display: flex;
gap: 1rem;
align-items: center;
z-index: 1000;
}
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 0.75rem;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
display: inline-block;
}
.btn-primary {
background: linear-gradient(135deg, #00d4ff, #0891b2);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}
.btn-logout {
background: linear-gradient(135deg, #dc3545, #c82333);
color: white;
}
.btn-logout:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
}
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.welcome-card {
background: rgba(15, 23, 42, 0.8);
border: 1px solid #1e293b;
border-radius: 1rem;
padding: 2rem;
backdrop-filter: blur(20px);
margin-bottom: 2rem;
text-align: center;
}
.card {
background: rgba(15, 23, 42, 0.8);
border: 1px solid #1e293b;
border-radius: 1rem;
padding: 2rem;
backdrop-filter: blur(20px);
transition: all 0.2s ease;
}
.card:hover {
transform: translateY(-2px);
border-color: #00d4ff;
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.1);
}
.card h3 {
color: #ffffff;
font-size: 1.3rem;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.card p {
color: #8892b0;
line-height: 1.6;
}
.loading {
text-align: center;
padding: 2rem;
color: #8892b0;
}
.spinner {
border: 3px solid #1e293b;
border-top: 3px solid #00d4ff;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.user-info {
display: flex;
align-items: center;
gap: 0.5rem;
color: #8892b0;
font-size: 0.9rem;
}
.user-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
background: linear-gradient(135deg, #00d4ff, #0891b2);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
font-size: 0.8rem;
}
/* Modal Styles */
.modal {
display: none;
position: fixed;
z-index: 2000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
}
.modal-content {
background: rgba(15, 23, 42, 0.95);
margin: 5% auto;
padding: 2rem;
border: 1px solid #1e293b;
border-radius: 1rem;
width: 90%;
max-width: 500px;
backdrop-filter: blur(20px);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.modal-title {
color: #ffffff;
font-size: 1.5rem;
font-weight: 600;
}
.close {
color: #8892b0;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
transition: color 0.2s ease;
}
.close:hover {
color: #ffffff;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
color: #e2e8f0;
font-weight: 500;
margin-bottom: 0.5rem;
}
.form-input {
width: 100%;
padding: 0.75rem;
background: #1e293b;
border: 2px solid #334155;
border-radius: 0.5rem;
color: #ffffff;
font-size: 1rem;
transition: border-color 0.2s ease;
}
.form-input:focus {
outline: none;
border-color: #00d4ff;
}
.form-input::placeholder {
color: #64748b;
}
.message {
padding: 1rem;
border-radius: 0.5rem;
margin-bottom: 1rem;
font-weight: 500;
}
.message.success {
background: rgba(34, 197, 94, 0.1);
color: #22c55e;
border: 1px solid rgba(34, 197, 94, 0.3);
}
.message.error {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.3);
}
.message.info {
background: rgba(59, 130, 246, 0.1);
color: #3b82f6;
border: 1px solid rgba(59, 130, 246, 0.3);
}
.player-selection {
display: grid;
gap: 0.5rem;
max-height: 200px;
overflow-y: auto;
background: #0f172a;
border-radius: 0.5rem;
padding: 1rem;
}
.player-option {
padding: 0.75rem;
background: #1e293b;
border: 2px solid #334155;
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
justify-content: space-between;
align-items: center;
}
.player-option:hover {
border-color: #00d4ff;
background: #334155;
}
.player-option.selected {
border-color: #00d4ff;
background: rgba(0, 212, 255, 0.1);
}
.player-info {
color: #e2e8f0;
}
.player-rfid {
color: #8892b0;
font-size: 0.9rem;
font-family: monospace;
}
.times-grid {
display: grid;
gap: 1rem;
max-height: 400px;
overflow-y: auto;
}
.time-card {
background: #1e293b;
border: 1px solid #334155;
border-radius: 0.5rem;
padding: 1rem;
}
.time-location {
color: #00d4ff;
font-weight: 600;
margin-bottom: 0.5rem;
}
.time-value {
color: #ffffff;
font-size: 1.2rem;
font-weight: bold;
font-family: monospace;
}
.time-date {
color: #8892b0;
font-size: 0.9rem;
margin-top: 0.5rem;
}
/* Times Section Styles */
.times-section {
background: rgba(15, 23, 42, 0.8);
border: 1px solid #1e293b;
border-radius: 1rem;
padding: 2rem;
backdrop-filter: blur(20px);
margin-top: 2rem;
}
.times-header {
text-align: center;
margin-bottom: 2rem;
}
.times-header h2 {
color: #ffffff;
font-size: 2rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.times-header p {
color: #8892b0;
font-size: 1.1rem;
}
.times-loading {
text-align: center;
padding: 3rem;
color: #8892b0;
}
.times-not-linked {
text-align: center;
padding: 3rem 2rem;
}
.not-linked-content {
max-width: 600px;
margin: 0 auto;
}
.not-linked-icon {
font-size: 4rem;
margin-bottom: 1rem;
}
.times-not-linked h3 {
color: #ffffff;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1rem;
}
.times-not-linked p {
color: #8892b0;
font-size: 1.1rem;
margin-bottom: 2rem;
line-height: 1.6;
}
.link-info {
background: rgba(0, 212, 255, 0.1);
border: 1px solid rgba(0, 212, 255, 0.3);
border-radius: 0.75rem;
padding: 1.5rem;
margin-top: 2rem;
text-align: left;
}
.link-info h4 {
color: #00d4ff;
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 1rem;
}
.link-info ol {
color: #cbd5e1;
padding-left: 1.5rem;
}
.link-info li {
margin-bottom: 0.5rem;
line-height: 1.5;
}
.times-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background: rgba(0, 212, 255, 0.1);
border: 1px solid rgba(0, 212, 255, 0.3);
border-radius: 0.75rem;
padding: 1.5rem;
text-align: center;
transition: all 0.2s ease;
}
.stat-card:hover {
transform: translateY(-2px);
border-color: #00d4ff;
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.1);
}
.stat-number {
color: #00d4ff;
font-size: 2rem;
font-weight: 700;
font-family: monospace;
margin-bottom: 0.5rem;
}
.stat-label {
color: #8892b0;
font-size: 0.9rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.times-content {
margin-top: 2rem;
}
.times-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.user-time-card {
background: #1e293b;
border: 1px solid #334155;
border-radius: 0.75rem;
padding: 1.5rem;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
cursor: pointer;
}
.user-time-card:hover {
transform: translateY(-2px);
border-color: #00d4ff;
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.1);
}
.user-time-card.expanded {
transform: none;
border-color: #00d4ff;
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.2);
}
.user-time-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #00d4ff, #0891b2);
}
.time-location-name {
color: #00d4ff;
font-weight: 600;
font-size: 1.1rem;
margin-bottom: 0.5rem;
}
.time-value-large {
color: #ffffff;
font-size: 2rem;
font-weight: bold;
font-family: monospace;
margin-bottom: 0.5rem;
}
.time-date-info {
color: #8892b0;
font-size: 0.9rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.time-rank {
background: rgba(255, 107, 53, 0.1);
color: #ff6b35;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.8rem;
font-weight: 600;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1rem;
}
.expand-indicator {
color: #8892b0;
font-size: 1.2rem;
transition: transform 0.3s ease;
margin-left: 0.5rem;
}
.user-time-card.expanded .expand-indicator {
transform: rotate(180deg);
}
.card-main-content {
margin-bottom: 1rem;
}
.expanded-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease, opacity 0.3s ease;
opacity: 0;
}
.user-time-card.expanded .expanded-content {
max-height: 1000px;
opacity: 1;
}
.all-runs-title {
color: #00d4ff;
font-size: 1rem;
font-weight: 600;
margin-bottom: 1rem;
padding-top: 1rem;
border-top: 1px solid #334155;
}
.run-item {
background: rgba(0, 212, 255, 0.05);
border: 1px solid rgba(0, 212, 255, 0.1);
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 0.75rem;
display: flex;
justify-content: space-between;
align-items: center;
transition: all 0.2s ease;
}
.run-item:hover {
background: rgba(0, 212, 255, 0.1);
border-color: rgba(0, 212, 255, 0.3);
}
.run-item:last-child {
margin-bottom: 0;
}
.run-time {
color: #ffffff;
font-size: 1.1rem;
font-weight: 600;
font-family: monospace;
}
.run-details {
text-align: right;
color: #8892b0;
font-size: 0.85rem;
}
.run-rank-badge {
background: #00d4ff;
color: #0a0a0f;
padding: 0.2rem 0.5rem;
border-radius: 0.3rem;
font-size: 0.75rem;
font-weight: 700;
margin-left: 0.5rem;
}
.run-rank-badge.best {
background: #22c55e;
}
.run-rank-badge.second {
background: #f59e0b;
}
.run-rank-badge.third {
background: #ef4444;
}
@media (max-width: 768px) {
.header {
padding: 1rem;
flex-direction: column;
gap: 1rem;
}
.nav-buttons {
flex-wrap: wrap;
justify-content: center;
}
.container {
padding: 0 1rem;
}
.dashboard-grid {
grid-template-columns: 1fr;
}
.modal-content {
margin: 2% auto;
width: 95%;
padding: 1.5rem;
}
}