Update static/style.css

This commit is contained in:
2025-12-12 16:13:00 -05:00
parent 21765f2b0b
commit 0b510393f4
+529 -319
View File
@@ -1,319 +1,529 @@
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
body { body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh; min-height: 100vh;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
} }
.container { .container {
background: white; background: white;
border-radius: 15px; border-radius: 15px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
max-width: 900px; max-width: 900px;
width: 100%; width: 100%;
padding: 40px; padding: 40px;
} }
h1 { h1 {
text-align: center; text-align: center;
color: #333; color: #333;
margin-bottom: 30px; margin-bottom: 30px;
font-size: 2.5em; font-size: 2.5em;
} }
h2 { h2 {
color: #667eea; color: #667eea;
margin-bottom: 20px; margin-bottom: 20px;
text-align: center; text-align: center;
} }
h3 { h3 {
color: #555; color: #555;
margin-bottom: 15px; margin-bottom: 15px;
font-size: 1.1em; font-size: 1.1em;
} }
.screen { .screen {
display: block; display: block;
} }
.screen.hidden { .screen.hidden {
display: none; display: none;
} }
/* Start Screen */ /* Start Screen */
#startScreen .form-group { #startScreen .form-group {
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
#startScreen label { #startScreen label {
display: block; display: block;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 1.1em; font-size: 1.1em;
color: #333; color: #333;
} }
#startScreen input { #startScreen input {
padding: 10px 15px; padding: 10px 15px;
font-size: 1em; font-size: 1em;
border: 2px solid #667eea; border: 2px solid #667eea;
border-radius: 5px; border-radius: 5px;
margin-right: 10px; margin-right: 10px;
width: 100px; width: 100px;
} }
/* Game Header */ /* Game Header */
.game-header { .game-header {
margin-bottom: 30px; margin-bottom: 30px;
padding: 20px; padding: 20px;
background: #f8f9fa; background: #f8f9fa;
border-radius: 10px; border-radius: 10px;
} }
.info-box { .info-box {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px; gap: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.info-box h3 { .info-box h3 {
background: #667eea; background: #667eea;
color: white; color: white;
padding: 15px; padding: 15px;
border-radius: 8px; border-radius: 8px;
margin-bottom: 0; margin-bottom: 0;
font-size: 1em; font-size: 1em;
} }
.message { .section .info-box {
padding: 15px; margin-bottom: 20px;
background: #e8f5e9; }
border-left: 4px solid #4caf50;
border-radius: 5px; .message {
color: #2e7d32; padding: 15px;
display: none; background: #e8f5e9;
margin-top: 10px; border-left: 4px solid #4caf50;
} border-radius: 5px;
color: #2e7d32;
.message.show { display: none;
display: block; }
}
.message.show {
.message.error { display: block;
background: #ffebee; }
border-left-color: #f44336;
color: #c62828; .message.error {
} background: #ffebee;
border-left-color: #f44336;
/* Game Content */ color: #c62828;
.game-content { }
display: grid;
grid-template-columns: 1fr 1fr; /* Game Content */
gap: 20px; .game-content {
} display: grid;
grid-template-columns: 1fr 1fr;
.section { gap: 20px;
background: #f8f9fa; }
padding: 20px;
border-radius: 10px; .section {
border: 1px solid #e0e0e0; background: #f8f9fa;
} padding: 20px;
border-radius: 10px;
.stocks-list, border: 1px solid #e0e0e0;
.holdings-list { }
display: flex;
flex-direction: column; .stocks-list,
gap: 10px; .holdings-list,
} .companies-list {
display: flex;
.stock-item, flex-direction: column;
.holding-item { gap: 10px;
background: white; }
padding: 12px;
border-radius: 6px; .stock-item,
border-left: 4px solid #667eea; .holding-item,
display: flex; .company-item {
justify-content: space-between; background: white;
align-items: center; padding: 12px;
} border-radius: 6px;
border-left: 4px solid #667eea;
.holding-item { display: flex;
border-left-color: #764ba2; justify-content: space-between;
} align-items: center;
}
.stock-item span,
.holding-item span { .holding-item {
font-weight: bold; border-left-color: #764ba2;
color: #667eea; }
}
.company-item {
/* Form Groups */ border-left-color: #2196F3;
.form-group { padding: 15px;
margin-bottom: 15px; gap: 20px;
} }
.form-group label { .company-info {
display: block; flex: 1;
margin-bottom: 8px; }
color: #333;
font-weight: bold; .company-name {
} font-weight: bold;
color: #333;
.form-group input, font-size: 1.05em;
.form-group select { margin-bottom: 5px;
width: 100%; }
padding: 10px;
border: 2px solid #e0e0e0; .company-details {
border-radius: 5px; display: flex;
font-size: 1em; gap: 20px;
transition: border-color 0.3s; font-size: 0.9em;
} color: #666;
}
.form-group input:focus,
.form-group select:focus { .company-details span {
outline: none; font-weight: 500;
border-color: #667eea; }
}
.company-value {
/* Buttons */ font-weight: bold;
button { color: #2196F3;
padding: 12px 20px; font-size: 1.1em;
border: none; min-width: 100px;
border-radius: 6px; text-align: right;
font-size: 1em; }
cursor: pointer;
transition: all 0.3s; .stock-item span,
font-weight: bold; .holding-item span {
} font-weight: bold;
color: #667eea;
button:hover { }
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Form Groups */
} .form-group {
margin-bottom: 15px;
#startScreen button { }
background: #667eea;
color: white; .form-group label {
} display: block;
margin-bottom: 8px;
#startScreen button:hover { color: #333;
background: #764ba2; font-weight: bold;
} }
.button-group { .form-group input,
display: flex; .form-group select {
gap: 10px; width: 100%;
} padding: 10px;
border: 2px solid #e0e0e0;
.btn-buy { border-radius: 5px;
background: #4caf50; font-size: 1em;
color: white; transition: border-color 0.3s;
flex: 1; }
}
.form-group input:focus,
.btn-buy:hover { .form-group select:focus {
background: #45a049; outline: none;
} border-color: #667eea;
}
.btn-sell {
background: #ff9800; /* Buttons */
color: white; button {
flex: 1; padding: 12px 20px;
} border: none;
border-radius: 6px;
.btn-sell:hover { font-size: 1em;
background: #e68900; cursor: pointer;
} transition: all 0.3s;
font-weight: bold;
.btn-next-day { }
background: #667eea;
color: white; button:hover {
width: 100%; transform: translateY(-2px);
padding: 15px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
font-size: 1.1em; }
}
#startScreen button {
.btn-next-day:hover { background: #667eea;
background: #764ba2; color: white;
} }
/* End Screen */ #startScreen button:hover {
.end-stats { background: #764ba2;
text-align: center; }
padding: 20px;
background: #f8f9fa; .button-group {
border-radius: 10px; display: flex;
} gap: 10px;
}
.end-stats p {
font-size: 1.1em; .btn-buy {
margin: 10px 0; background: #4caf50;
color: #333; color: white;
} flex: 1;
}
.end-stats .profit {
font-size: 1.3em; .btn-buy:hover {
font-weight: bold; background: #45a049;
color: #4caf50; }
margin-top: 20px;
} .btn-sell {
background: #ff9800;
#finalHoldings { color: white;
text-align: left; flex: 1;
margin: 20px 0; }
padding: 15px;
background: white; .btn-sell:hover {
border-radius: 6px; background: #e68900;
} }
.holding-final { .btn-buy-all {
display: flex; background: #2196F3;
justify-content: space-between; color: white;
padding: 8px 0; flex: 1;
border-bottom: 1px solid #e0e0e0; }
}
.btn-buy-all:hover {
.holding-final:last-child { background: #0b7dda;
border-bottom: none; }
}
.btn-sell-all {
#endScreen button { background: #f57c00;
background: #667eea; color: white;
color: white; flex: 1;
margin-top: 20px; }
padding: 12px 30px;
} .btn-sell-all:hover {
background: #e65100;
#endScreen button:hover { }
background: #764ba2;
} .btn-next-day {
background: #667eea;
/* Responsive */ color: white;
@media (max-width: 768px) { width: 100%;
.container { padding: 15px;
padding: 20px; font-size: 1.1em;
} }
.game-content { .btn-next-day:hover {
grid-template-columns: 1fr; background: #764ba2;
} }
.info-box { /* Charts Container */
grid-template-columns: 1fr; .charts-container {
} display: grid;
grid-template-columns: 1fr;
h1 { gap: 20px;
font-size: 1.8em; margin-top: 30px;
} }
}
.chart-item {
background: #f8f9fa;
padding: 20px;
border-radius: 10px;
border: 1px solid #e0e0e0;
min-height: 400px;
position: relative;
}
.chart-item canvas {
max-height: 400px;
}
/* End Screen */
.end-stats {
text-align: center;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
}
.end-stats p {
font-size: 1.1em;
margin: 10px 0;
color: #333;
}
.end-stats .profit {
font-size: 1.3em;
font-weight: bold;
color: #4caf50;
margin-top: 20px;
}
#finalHoldings {
text-align: left;
margin: 20px 0;
padding: 15px;
background: white;
border-radius: 6px;
}
.holding-final {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #e0e0e0;
}
.holding-final:last-child {
border-bottom: none;
}
#endScreen button {
background: #667eea;
color: white;
margin-top: 20px;
padding: 12px 30px;
}
#endScreen button:hover {
background: #764ba2;
}
.btn-leaderboard {
background: #9c27b0;
color: white;
width: 100%;
margin-top: 10px;
}
.btn-leaderboard:hover {
background: #7b1fa2;
}
.btn-save-score {
background: #667eea;
color: white;
width: 100%;
}
.btn-save-score:hover {
background: #764ba2;
}
.btn-back {
background: #667eea;
color: white;
width: 100%;
margin-top: 20px;
padding: 12px;
}
.btn-back:hover {
background: #764ba2;
}
/* Leaderboard Screen */
.leaderboard-container {
background: #f8f9fa;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
min-height: 300px;
}
.leaderboard-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.leaderboard-entry {
background: white;
padding: 15px;
border-radius: 8px;
border-left: 4px solid #667eea;
display: flex;
justify-content: space-between;
align-items: center;
}
.leaderboard-entry.rank-1 {
border-left-color: #ffd700;
background: #fffbf0;
}
.leaderboard-entry.rank-2 {
border-left-color: #c0c0c0;
background: #f5f5f5;
}
.leaderboard-entry.rank-3 {
border-left-color: #cd7f32;
background: #f9f5f0;
}
.leaderboard-rank {
font-size: 1.5em;
font-weight: bold;
color: #667eea;
min-width: 40px;
text-align: center;
}
.leaderboard-info {
flex: 1;
margin: 0 15px;
}
.leaderboard-name {
font-weight: bold;
color: #333;
font-size: 1.1em;
}
.leaderboard-stats {
font-size: 0.9em;
color: #666;
margin-top: 5px;
}
.leaderboard-profit {
font-size: 1.2em;
font-weight: bold;
min-width: 120px;
text-align: right;
}
.leaderboard-profit.positive {
color: #4caf50;
}
.leaderboard-profit.negative {
color: #f44336;
}
.empty-message {
text-align: center;
padding: 40px 20px;
color: #999;
font-size: 1.1em;
}
/* Responsive */
@media (max-width: 768px) {
.container {
padding: 20px;
}
.game-content {
grid-template-columns: 1fr;
}
.info-box {
grid-template-columns: 1fr;
}
.charts-container {
grid-template-columns: 1fr;
}
.chart-item {
min-height: 250px;
}
h1 {
font-size: 1.8em;
}
}