Modernize UI design with new color system, typography and layout
- Add sticky dark header with nav replacing inline text links - Introduce CSS custom properties design system (colors, spacing, shadows) - Use DM Sans + JetBrains Mono fonts replacing Arial - Modernize tables with uppercase headers and subtle hover states - Add gradient fill and rounded line to rating chart - Unify card sections across players and courses pages - Add backdrop blur to modals - Clean up inline styles to use CSS variables
This commit is contained in:
+347
-89
@@ -1,163 +1,421 @@
|
||||
/* Shared styles for PDGA Ratings app */
|
||||
/* ═══════════════════════════════════════════════════
|
||||
PDGA Ratings — Shared Design System
|
||||
═══════════════════════════════════════════════════ */
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');
|
||||
|
||||
:root {
|
||||
/* Color system */
|
||||
--surface-0: #f0f2f5;
|
||||
--surface-1: #ffffff;
|
||||
--surface-2: #f8f9fb;
|
||||
--surface-3: #eef0f4;
|
||||
|
||||
--navy-900: #0f172a;
|
||||
--navy-800: #1e293b;
|
||||
--navy-700: #334155;
|
||||
--navy-600: #475569;
|
||||
|
||||
--text-primary: #0f172a;
|
||||
--text-secondary: #64748b;
|
||||
--text-muted: #94a3b8;
|
||||
--text-inverse: #f8fafc;
|
||||
|
||||
--accent: #3b82f6;
|
||||
--accent-hover: #2563eb;
|
||||
--accent-subtle: rgba(59, 130, 246, 0.08);
|
||||
--accent-border: rgba(59, 130, 246, 0.2);
|
||||
|
||||
--green: #10b981;
|
||||
--green-subtle: rgba(16, 185, 129, 0.1);
|
||||
--red: #ef4444;
|
||||
--red-subtle: rgba(239, 68, 68, 0.1);
|
||||
--amber: #f59e0b;
|
||||
|
||||
--border: #e2e8f0;
|
||||
--border-light: #f1f5f9;
|
||||
|
||||
--radius-sm: 6px;
|
||||
--radius-md: 10px;
|
||||
--radius-lg: 14px;
|
||||
--radius-xl: 20px;
|
||||
|
||||
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
--shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
|
||||
--shadow-overlay: 0 20px 60px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(15, 23, 42, 0.08);
|
||||
|
||||
--font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
--font-mono: 'JetBrains Mono', 'SF Mono', monospace;
|
||||
|
||||
--transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
/* ── Reset & Base ─────────────────────────────── */
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-family: var(--font-sans);
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
padding: 0;
|
||||
background-color: var(--surface-0);
|
||||
color: var(--text-primary);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
padding: 10px;
|
||||
}
|
||||
/* ── App Shell ────────────────────────────────── */
|
||||
|
||||
.app-header {
|
||||
background: var(--navy-900);
|
||||
color: var(--text-inverse);
|
||||
padding: 0 24px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 800px;
|
||||
.header-inner {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
padding: 15px;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
.app-logo {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--text-inverse);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
.app-logo .logo-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: var(--accent);
|
||||
border-radius: var(--radius-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
.app-nav {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
table {
|
||||
font-size: 12px;
|
||||
}
|
||||
th, td {
|
||||
padding: 8px 4px;
|
||||
}
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
.app-nav a {
|
||||
padding: 6px 14px;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: color var(--transition), background var(--transition);
|
||||
}
|
||||
|
||||
.app-nav a:hover {
|
||||
color: var(--text-inverse);
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.app-nav a.active {
|
||||
color: var(--text-inverse);
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
/* ── Container ────────────────────────────────── */
|
||||
|
||||
.container {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 28px 24px 60px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 26px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: -0.03em;
|
||||
margin: 0 0 24px 0;
|
||||
}
|
||||
|
||||
/* ── Loading ──────────────────────────────────── */
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
font-size: 15px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* ── Tables ───────────────────────────────────── */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
thead {
|
||||
position: sticky;
|
||||
top: 56px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f8f9fa;
|
||||
font-weight: bold;
|
||||
color: #495057;
|
||||
padding: 10px 16px;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--text-secondary);
|
||||
background: var(--surface-2);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
th:first-child {
|
||||
border-radius: var(--radius-md) 0 0 0;
|
||||
}
|
||||
|
||||
th:last-child {
|
||||
border-radius: 0 var(--radius-md) 0 0;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border-light);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.expandable-row {
|
||||
cursor: pointer;
|
||||
transition: background var(--transition);
|
||||
}
|
||||
|
||||
.expandable-row:hover {
|
||||
background-color: #e3f2fd;
|
||||
background: var(--accent-subtle);
|
||||
}
|
||||
|
||||
.expanded-content {
|
||||
display: none;
|
||||
background-color: #f8f9fa;
|
||||
border-top: 2px solid #007bff;
|
||||
}
|
||||
|
||||
.expanded-content td {
|
||||
padding: 20px;
|
||||
padding: 0;
|
||||
background: var(--surface-2);
|
||||
border-top: 2px solid var(--accent);
|
||||
}
|
||||
|
||||
.expanded-cell {
|
||||
padding: 20px !important;
|
||||
}
|
||||
|
||||
/* ── Links ────────────────────────────────────── */
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: var(--accent-hover);
|
||||
}
|
||||
|
||||
/* ── Buttons ──────────────────────────────────── */
|
||||
|
||||
.btn {
|
||||
padding: 8px 16px;
|
||||
background-color: #007bff;
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-sans);
|
||||
transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: #0056b3;
|
||||
background: var(--accent-hover);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
background-color: #6c757d;
|
||||
background: var(--text-muted);
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* ── Card Section ─────────────────────────────── */
|
||||
|
||||
.card-section {
|
||||
background: var(--surface-1);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 24px;
|
||||
margin-bottom: 28px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.card-section h3 {
|
||||
margin: 0 0 14px 0;
|
||||
color: var(--text-primary);
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card-section-form {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* ── Inputs ───────────────────────────────────── */
|
||||
|
||||
.input {
|
||||
padding: 9px 14px;
|
||||
font-size: 14px;
|
||||
font-family: var(--font-sans);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
outline: none;
|
||||
background: var(--surface-1);
|
||||
color: var(--text-primary);
|
||||
transition: border-color var(--transition), box-shadow var(--transition);
|
||||
}
|
||||
|
||||
.input:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-subtle);
|
||||
}
|
||||
|
||||
.input::placeholder {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.card-section {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.card-section-form {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-section-form .input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Refresh Icons ────────────────────────────── */
|
||||
|
||||
.refresh-icon {
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
margin-left: 8px;
|
||||
font-size: 13px;
|
||||
color: #6c757d;
|
||||
transition: all 0.2s ease;
|
||||
padding: 2px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
transition: all var(--transition);
|
||||
padding: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.refresh-icon:hover {
|
||||
opacity: 1;
|
||||
color: #007bff;
|
||||
background-color: rgba(0, 123, 255, 0.1);
|
||||
transform: scale(1.1);
|
||||
color: var(--accent);
|
||||
background: var(--accent-subtle);
|
||||
}
|
||||
|
||||
.refresh-icon.spinning {
|
||||
animation: spin 1s linear infinite;
|
||||
color: #007bff;
|
||||
animation: spin 0.8s linear infinite;
|
||||
color: var(--accent);
|
||||
opacity: 1;
|
||||
background-color: rgba(0, 123, 255, 0.1);
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* ── Responsive ───────────────────────────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
padding: 16px 12px 40px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.app-logo {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.app-nav a {
|
||||
padding: 5px 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 10px 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
thead {
|
||||
top: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
th, td {
|
||||
padding: 8px 6px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user