Spaces:
Sleeping
Sleeping
:root { | |
--primary-color: #065fd4; | |
--primary-hover: #3e8eff; | |
--secondary-color: #2c2c2c; | |
--text-color: #f8f8f8; | |
--text-secondary: #a0a0a0; | |
--border-color: #333333; | |
--gold: #ffd700; | |
--silver: #c0c0c0; | |
--bronze: #cd7f32; | |
--background: #121212; | |
--card-bg: #1e1e1e; | |
--shadow: 0 2px 10px rgba(0, 0, 0, 0.3); | |
--animation-speed: 0.3s; | |
} | |
* { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
font-family: 'Roboto', Arial, sans-serif; | |
background: var(--background); | |
color: var(--text-color); | |
line-height: 1.6; | |
} | |
.container { | |
max-width: 1200px; | |
margin: 40px auto; | |
background: var(--card-bg); | |
padding: 24px 32px; | |
border-radius: 12px; | |
box-shadow: var(--shadow); | |
} | |
header { | |
text-align: center; | |
margin-bottom: 24px; | |
padding-bottom: 16px; | |
border-bottom: 1px solid var(--border-color); | |
} | |
h1 { | |
font-size: 28px; | |
margin-bottom: 8px; | |
color: var(--text-color); | |
} | |
.subtitle { | |
color: var(--text-secondary); | |
font-size: 16px; | |
} | |
/* Tabs styling */ | |
.tabs-container { | |
margin-bottom: 24px; | |
overflow-x: auto; | |
} | |
.tabs { | |
display: flex; | |
border-bottom: 1px solid var(--border-color); | |
white-space: nowrap; | |
} | |
.tab { | |
padding: 12px 16px; | |
cursor: pointer; | |
font-weight: 500; | |
color: var(--text-secondary); | |
position: relative; | |
transition: color var(--animation-speed); | |
} | |
.tab:hover { | |
color: var(--primary-color); | |
} | |
.tab.active { | |
color: var(--primary-color); | |
} | |
.tab.active::after { | |
content: ''; | |
position: absolute; | |
bottom: -1px; | |
left: 0; | |
width: 100%; | |
height: 3px; | |
background-color: var(--primary-color); | |
} | |
/* Leaderboard styling */ | |
.leaderboard-section { | |
display: none; | |
margin-bottom: 32px; | |
} | |
.leaderboard-section.active { | |
display: block; | |
animation: fadeIn 0.3s ease-in-out; | |
} | |
@keyframes fadeIn { | |
from { opacity: 0; } | |
to { opacity: 1; } | |
} | |
.section-header { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
margin-bottom: 16px; | |
} | |
.section-title { | |
font-size: 20px; | |
font-weight: 500; | |
} | |
.sort-options { | |
display: flex; | |
gap: 8px; | |
} | |
.sort-option { | |
background: none; | |
border: none; | |
color: var(--text-secondary); | |
cursor: pointer; | |
font-size: 14px; | |
padding: 4px 8px; | |
border-radius: 16px; | |
transition: all var(--animation-speed); | |
} | |
.sort-option:hover { | |
background: var(--secondary-color); | |
} | |
.sort-option.active { | |
background: var(--secondary-color); | |
color: var(--primary-color); | |
font-weight: 500; | |
} | |
/* Poll items */ | |
.poll-items { | |
margin-top: 16px; | |
} | |
.poll-item { | |
background: var(--card-bg); | |
border-radius: 8px; | |
padding: 16px; | |
margin-bottom: 12px; | |
border: 1px solid var(--border-color); | |
transition: transform 0.2s, box-shadow 0.2s; | |
} | |
.poll-item:hover { | |
transform: translateY(-2px); | |
box-shadow: var(--shadow); | |
} | |
.poll-item.highlight { | |
animation: highlight 1s ease-in-out; | |
} | |
@keyframes highlight { | |
0%, 100% { background-color: var(--card-bg); } | |
50% { background-color: rgba(6, 95, 212, 0.1); } | |
} | |
.poll-item-header { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
margin-bottom: 8px; | |
} | |
.poll-item-name { | |
font-weight: 500; | |
font-size: 16px; | |
display: flex; | |
align-items: center; | |
} | |
.rank { | |
display: inline-block; | |
width: 24px; | |
height: 24px; | |
border-radius: 50%; | |
text-align: center; | |
line-height: 24px; | |
font-size: 14px; | |
margin-right: 8px; | |
font-weight: bold; | |
} | |
.rank-1 { | |
background-color: var(--gold); | |
color: #000; | |
} | |
.rank-2 { | |
background-color: var(--silver); | |
color: #000; | |
} | |
.rank-3 { | |
background-color: var(--bronze); | |
color: #000; | |
} | |
.poll-item-votes { | |
font-size: 14px; | |
color: var(--text-secondary); | |
} | |
.progress-container { | |
height: 8px; | |
background-color: var(--secondary-color); | |
border-radius: 4px; | |
overflow: hidden; | |
margin-bottom: 8px; | |
} | |
.progress-bar { | |
height: 100%; | |
background-color: var(--primary-color); | |
border-radius: 4px; | |
transition: width 0.5s ease-in-out; | |
} | |
.poll-item-footer { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
margin-top: 8px; | |
} | |
.vote-percentage { | |
font-size: 14px; | |
font-weight: 500; | |
} | |
.vote-btn { | |
background-color: var(--primary-color); | |
color: white; | |
border: none; | |
border-radius: 18px; | |
padding: 6px 16px; | |
font-size: 14px; | |
font-weight: 500; | |
cursor: pointer; | |
transition: background-color var(--animation-speed); | |
} | |
.vote-btn:hover { | |
background-color: var(--primary-hover); | |
} | |
.vote-btn:disabled { | |
background-color: var(--text-secondary); | |
cursor: not-allowed; | |
opacity: 0.7; | |
} | |
.vote-btn.voted { | |
background-color: var(--text-secondary); | |
} | |
/* Add form */ | |
.add-form-container { | |
margin-top: 24px; | |
padding-top: 16px; | |
border-top: 1px solid var(--border-color); | |
} | |
.add-form { | |
display: flex; | |
gap: 8px; | |
} | |
.input-container { | |
flex: 1; | |
position: relative; | |
} | |
.add-input { | |
width: 100%; | |
padding: 10px 12px; | |
padding-right: 36px; /* Space for validation indicator */ | |
border: 1px solid var(--border-color); | |
border-radius: 4px; | |
font-size: 14px; | |
background-color: var(--card-bg); | |
color: white; | |
} | |
.add-input:focus { | |
outline: none; | |
border-color: var(--primary-color); | |
} | |
/* Validation indicator */ | |
.validation-indicator { | |
position: absolute; | |
right: 10px; | |
top: 50%; | |
transform: translateY(-50%); | |
width: 20px; | |
height: 20px; | |
border-radius: 50%; | |
display: none; | |
} | |
.validation-indicator.valid { | |
display: block; | |
background-color: #4CAF50; | |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E"); | |
background-size: 14px; | |
background-position: center; | |
background-repeat: no-repeat; | |
} | |
.validation-indicator.invalid { | |
display: block; | |
background-color: #F44336; | |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E"); | |
background-size: 14px; | |
background-position: center; | |
background-repeat: no-repeat; | |
} | |
/* Dropdown styles */ | |
.dropdown-container { | |
position: absolute; | |
width: 100%; | |
z-index: 10; | |
margin-top: 2px; | |
} | |
.dropdown-results { | |
max-height: 200px; | |
overflow-y: auto; | |
background-color: var(--card-bg); | |
border: 1px solid var(--border-color); | |
border-radius: 4px; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); | |
} | |
.dropdown-item { | |
padding: 10px 12px; | |
cursor: pointer; | |
transition: background-color 0.2s; | |
list-style: none; | |
border-bottom: 1px solid var(--border-color); | |
} | |
.dropdown-item:last-child { | |
border-bottom: none; | |
} | |
.dropdown-item:hover { | |
background-color: var(--secondary-color); | |
} | |
.dropdown-item-name { | |
font-weight: 500; | |
margin-bottom: 2px; | |
} | |
.dropdown-item-author { | |
font-size: 12px; | |
color: var(--text-secondary); | |
} | |
.no-results { | |
padding: 10px 12px; | |
color: var(--text-secondary); | |
font-style: italic; | |
list-style: none; | |
} | |
/* Loading indicator */ | |
.dropdown-loading { | |
display: flex; | |
align-items: center; | |
padding: 10px 12px; | |
background-color: var(--card-bg); | |
border: 1px solid var(--border-color); | |
border-radius: 4px; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); | |
} | |
.spinner { | |
width: 16px; | |
height: 16px; | |
border: 2px solid var(--border-color); | |
border-top: 2px solid var(--primary-color); | |
border-radius: 50%; | |
margin-right: 8px; | |
animation: spin 1s linear infinite; | |
} | |
@keyframes spin { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } | |
} | |
.dropdown-loading span { | |
font-size: 14px; | |
color: var(--text-secondary); | |
} | |
.add-btn { | |
background-color: var(--primary-color); | |
color: white; | |
border: none; | |
border-radius: 4px; | |
padding: 10px 16px; | |
font-size: 14px; | |
font-weight: 500; | |
cursor: pointer; | |
transition: background-color var(--animation-speed), opacity var(--animation-speed); | |
} | |
.add-btn:hover:not(:disabled) { | |
background-color: var(--primary-hover); | |
} | |
.add-btn:disabled { | |
opacity: 0.6; | |
cursor: not-allowed; | |
} | |
.error { | |
color: #d93025; | |
font-size: 14px; | |
margin-top: 8px; | |
display: block; | |
} | |
/* Info panel */ | |
.info-panel { | |
margin-top: 32px; | |
padding-top: 16px; | |
border-top: 1px solid var(--border-color); | |
display: flex; | |
flex-wrap: wrap; | |
gap: 16px; | |
} | |
.info-item { | |
display: flex; | |
align-items: center; | |
color: var(--text-secondary); | |
font-size: 14px; | |
} | |
.info-item i { | |
margin-right: 8px; | |
} | |
/* View toggle */ | |
.view-toggle { | |
display: flex; | |
justify-content: center; | |
margin-top: 15px; | |
} | |
.view-btn { | |
background-color: var(--secondary-color); | |
border: none; | |
padding: 8px 16px; | |
margin: 0 5px; | |
border-radius: 4px; | |
cursor: pointer; | |
font-weight: 500; | |
transition: all 0.2s ease; | |
} | |
.view-btn.active { | |
background-color: var(--primary-color); | |
color: white; | |
} | |
.view-btn:hover:not(.active) { | |
background-color: var(--border-color); | |
} | |
/* Archives view */ | |
#archives-view { | |
padding: 20px; | |
} | |
.archives-container { | |
background-color: var(--card-bg); | |
border-radius: 8px; | |
box-shadow: var(--shadow); | |
padding: 20px; | |
margin-bottom: 20px; | |
} | |
.archives-controls { | |
margin-bottom: 20px; | |
} | |
.archives-selector { | |
margin-bottom: 20px; | |
} | |
.archives-selector label { | |
display: block; | |
margin-bottom: 5px; | |
font-weight: 500; | |
} | |
.archives-selector select { | |
width: 100%; | |
padding: 8px; | |
border: 1px solid var(--border-color); | |
border-radius: 4px; | |
background-color: white; | |
} | |
.date-range-selector { | |
background-color: var(--secondary-color); | |
padding: 15px; | |
border-radius: 4px; | |
margin-bottom: 20px; | |
} | |
.date-range-selector h3 { | |
margin-top: 0; | |
margin-bottom: 10px; | |
font-size: 16px; | |
} | |
.date-inputs { | |
display: flex; | |
flex-wrap: wrap; | |
gap: 10px; | |
align-items: flex-end; | |
} | |
.date-input { | |
flex: 1; | |
min-width: 200px; | |
} | |
.date-input label { | |
display: block; | |
margin-bottom: 5px; | |
font-weight: 500; | |
} | |
.date-input input { | |
width: 100%; | |
padding: 8px; | |
border: 1px solid var(--border-color); | |
border-radius: 4px; | |
} | |
.search-btn { | |
background-color: var(--primary-color); | |
color: white; | |
border: none; | |
padding: 9px 16px; | |
border-radius: 4px; | |
cursor: pointer; | |
font-weight: 500; | |
} | |
.search-btn:hover { | |
background-color: var(--primary-hover); | |
} | |
#archive-results { | |
background-color: white; | |
border-radius: 4px; | |
padding: 15px; | |
border: 1px solid var(--border-color); | |
} | |
.archive-week-info { | |
background-color: var(--secondary-color); | |
padding: 10px 15px; | |
border-radius: 4px; | |
margin-bottom: 15px; | |
} | |
.archive-week-info p { | |
margin: 5px 0; | |
} | |
.archive-category { | |
margin-bottom: 20px; | |
} | |
.archive-category h3 { | |
border-bottom: 1px solid var(--border-color); | |
padding-bottom: 5px; | |
margin-bottom: 10px; | |
} | |
.no-archives { | |
text-align: center; | |
color: var(--text-secondary); | |
padding: 20px; | |
} | |
.hidden { | |
display: none; | |
} | |
/* Responsive */ | |
@media (max-width: 768px) { | |
.container { | |
margin: 20px 16px; | |
padding: 16px; | |
} | |
.add-form { | |
flex-direction: column; | |
} | |
.section-header { | |
flex-direction: column; | |
align-items: flex-start; | |
gap: 8px; | |
} | |
.sort-options { | |
width: 100%; | |
overflow-x: auto; | |
padding-bottom: 8px; | |
} | |
} |