Add App.css — game styles
This commit is contained in:
496
src/App.css
496
src/App.css
@@ -1,184 +1,332 @@
|
||||
.counter {
|
||||
font-size: 16px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
color: var(--accent);
|
||||
background: var(--accent-bg);
|
||||
border: 2px solid transparent;
|
||||
transition: border-color 0.3s;
|
||||
margin-bottom: 24px;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--accent-border);
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero {
|
||||
position: relative;
|
||||
|
||||
.base,
|
||||
.framework,
|
||||
.vite {
|
||||
inset-inline: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.base {
|
||||
width: 170px;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.framework,
|
||||
.vite {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.framework {
|
||||
z-index: 1;
|
||||
top: 34px;
|
||||
height: 28px;
|
||||
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
|
||||
scale(1.4);
|
||||
}
|
||||
|
||||
.vite {
|
||||
z-index: 0;
|
||||
top: 107px;
|
||||
height: 26px;
|
||||
width: auto;
|
||||
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
|
||||
scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
#center {
|
||||
/* Layout */
|
||||
.loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25px;
|
||||
place-content: center;
|
||||
place-items: center;
|
||||
flex-grow: 1;
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
padding: 32px 20px 24px;
|
||||
gap: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
#next-steps {
|
||||
display: flex;
|
||||
border-top: 1px solid var(--border);
|
||||
text-align: left;
|
||||
|
||||
& > div {
|
||||
flex: 1 1 0;
|
||||
padding: 32px;
|
||||
@media (max-width: 1024px) {
|
||||
padding: 24px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-bottom: 16px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
#docs {
|
||||
border-right: 1px solid var(--border);
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
}
|
||||
|
||||
#next-steps ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin: 32px 0 0;
|
||||
|
||||
.logo {
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--text-h);
|
||||
font-size: 16px;
|
||||
border-radius: 6px;
|
||||
background: var(--social-bg);
|
||||
display: flex;
|
||||
padding: 6px 12px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
text-decoration: none;
|
||||
transition: box-shadow 0.3s;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
font-style: italic;
|
||||
color: #6b5a3e;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.button-icon {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
}
|
||||
.game {
|
||||
max-width: 680px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1rem 4rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
margin-top: 20px;
|
||||
/* Header */
|
||||
.game-header {
|
||||
border-bottom: 1px solid #c8b89a;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.game-title {
|
||||
font-size: 2rem;
|
||||
font-weight: normal;
|
||||
letter-spacing: 0.15em;
|
||||
color: #2a1f0e;
|
||||
}
|
||||
|
||||
.game-subtitle {
|
||||
font-size: 0.8rem;
|
||||
color: #6b5a3e;
|
||||
font-style: italic;
|
||||
margin-top: 2px;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
/* Journey */
|
||||
.journey {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
li {
|
||||
flex: 1 1 calc(50% - 8px);
|
||||
}
|
||||
|
||||
a {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 88px;
|
||||
border-top: 1px solid var(--border);
|
||||
@media (max-width: 1024px) {
|
||||
height: 48px;
|
||||
}
|
||||
.journey-node {
|
||||
font-size: 0.75rem;
|
||||
padding: 3px 10px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #c8b89a;
|
||||
background: #ede8df;
|
||||
color: #6b5a3e;
|
||||
}
|
||||
|
||||
.ticks {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -4.5px;
|
||||
border: 5px solid transparent;
|
||||
}
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
border-left-color: var(--border);
|
||||
}
|
||||
&::after {
|
||||
right: 0;
|
||||
border-right-color: var(--border);
|
||||
}
|
||||
.journey-node.reached {
|
||||
background: #d4e8d4;
|
||||
color: #2d5a2d;
|
||||
border-color: #8fbc8f;
|
||||
}
|
||||
|
||||
.journey-node.current {
|
||||
background: #2d5a2d;
|
||||
color: #f0f7f0;
|
||||
border-color: #2d5a2d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.journey-arrow {
|
||||
color: #c8b89a;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
/* Stats */
|
||||
.stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.stat {
|
||||
background: #ede8df;
|
||||
border: 1px solid #c8b89a;
|
||||
border-radius: 6px;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.7rem;
|
||||
color: #6b5a3e;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 1.4rem;
|
||||
color: #2a1f0e;
|
||||
}
|
||||
|
||||
.stat-sub {
|
||||
font-size: 0.65rem;
|
||||
color: #6b5a3e;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Progress bar */
|
||||
.progress-wrap {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.progress-label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.75rem;
|
||||
color: #6b5a3e;
|
||||
font-style: italic;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.progress-track {
|
||||
height: 4px;
|
||||
background: #c8b89a;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: #2d5a2d;
|
||||
border-radius: 2px;
|
||||
transition: width 0.4s linear;
|
||||
}
|
||||
|
||||
.progress-fill.otium {
|
||||
background: #534ab7;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
.message {
|
||||
min-height: 1.2rem;
|
||||
font-size: 0.8rem;
|
||||
color: #2d5a2d;
|
||||
font-style: italic;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
/* Section title */
|
||||
.section-title {
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: #6b5a3e;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
/* Routes */
|
||||
.route-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.route-card {
|
||||
background: #faf7f2;
|
||||
border: 1px solid #c8b89a;
|
||||
border-radius: 8px;
|
||||
padding: 0.875rem 1rem;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.route-card:hover:not(.locked) {
|
||||
border-color: #8fbc8f;
|
||||
}
|
||||
|
||||
.route-card.locked {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.route-card.selected {
|
||||
border: 2px solid #2d5a2d;
|
||||
}
|
||||
|
||||
.route-name {
|
||||
font-size: 0.85rem;
|
||||
font-weight: bold;
|
||||
color: #2a1f0e;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.route-goods {
|
||||
font-size: 0.75rem;
|
||||
color: #6b5a3e;
|
||||
font-style: italic;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.route-desc {
|
||||
font-size: 0.72rem;
|
||||
color: #6b5a3e;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.route-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.route-profit {
|
||||
color: #2d5a2d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.route-time {
|
||||
color: #6b5a3e;
|
||||
}
|
||||
|
||||
.route-lock {
|
||||
font-size: 0.68rem;
|
||||
color: #6b5a3e;
|
||||
background: #ede8df;
|
||||
border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
display: inline-block;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
.actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #c8b89a;
|
||||
background: #faf7f2;
|
||||
color: #2a1f0e;
|
||||
font-size: 0.85rem;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.btn:hover:not(:disabled) {
|
||||
background: #ede8df;
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-dispatch {
|
||||
border-color: #2d5a2d;
|
||||
color: #2d5a2d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.btn-dispatch:hover:not(:disabled) {
|
||||
background: #d4e8d4;
|
||||
}
|
||||
|
||||
.btn-otium {
|
||||
border-color: #534ab7;
|
||||
color: #534ab7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.btn-otium:hover:not(:disabled) {
|
||||
background: #eeedfe;
|
||||
}
|
||||
|
||||
/* Journal */
|
||||
.journal {
|
||||
background: #faf7f2;
|
||||
border: 1px solid #c8b89a;
|
||||
border-radius: 8px;
|
||||
padding: 1rem 1.25rem;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.journal-entry {
|
||||
border-left: 2px solid #c8b89a;
|
||||
padding-left: 12px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.journal-entry:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.journal-entry.new {
|
||||
border-left-color: #534ab7;
|
||||
}
|
||||
|
||||
.journal-date {
|
||||
font-size: 0.7rem;
|
||||
color: #6b5a3e;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.journal-text {
|
||||
font-size: 0.85rem;
|
||||
color: #2a1f0e;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* Token */
|
||||
.token-bar {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid #c8b89a;
|
||||
font-size: 0.68rem;
|
||||
color: #6b5a3e;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.token-code {
|
||||
font-family: monospace;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user