feat: add MMGame backend and frontend source code
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: #1a1a2e;
|
||||
color: #e0e0e0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.app-container { min-height: 100vh; }
|
||||
a { color: #0f3460; text-decoration: none; }
|
||||
button {
|
||||
cursor: pointer; border: none; border-radius: 6px; padding: 10px 24px;
|
||||
font-size: 15px; font-family: inherit;
|
||||
}
|
||||
input, textarea {
|
||||
background: #16213e; border: 1px solid #0f3460; border-radius: 6px;
|
||||
padding: 10px 14px; color: #e0e0e0; font-size: 15px; font-family: inherit;
|
||||
outline: none; width: 100%;
|
||||
}
|
||||
input:focus, textarea:focus { border-color: #e94560; }
|
||||
|
||||
.btn-primary { background: #e94560; color: #fff; }
|
||||
.btn-primary:hover { background: #d63851; }
|
||||
.btn-secondary { background: #0f3460; color: #fff; }
|
||||
.btn-secondary:hover { background: #1a4a8a; }
|
||||
.btn-ghost { background: transparent; color: #e0e0e0; border: 1px solid #0f3460; }
|
||||
.btn-ghost:hover { background: #16213e; }
|
||||
|
||||
.card {
|
||||
background: #16213e; border-radius: 10px; padding: 24px;
|
||||
border: 1px solid #0f3460;
|
||||
}
|
||||
|
||||
.page { max-width: 1200px; margin: 0 auto; padding: 24px; }
|
||||
|
||||
/* Login */
|
||||
.login-page {
|
||||
display: flex; justify-content: center; align-items: center;
|
||||
min-height: 100vh; flex-direction: column; gap: 24px;
|
||||
}
|
||||
.login-box {
|
||||
background: #16213e; border-radius: 12px; padding: 40px;
|
||||
width: 400px; border: 1px solid #0f3460;
|
||||
}
|
||||
.login-box h1 { text-align: center; margin-bottom: 32px; color: #e94560; }
|
||||
.login-box form { display: flex; flex-direction: column; gap: 16px; }
|
||||
.login-box .tab-bar { display: flex; margin-bottom: 20px; }
|
||||
.login-box .tab-bar button {
|
||||
flex: 1; background: transparent; color: #888; padding: 12px;
|
||||
border-bottom: 2px solid transparent; border-radius: 0;
|
||||
}
|
||||
.login-box .tab-bar button.active { color: #e94560; border-bottom-color: #e94560; }
|
||||
.guest-btn { margin-top: 16px; text-align: center; }
|
||||
.guest-btn button { color: #0f3460; background: transparent; text-decoration: underline; }
|
||||
|
||||
/* Home */
|
||||
.hero {
|
||||
text-align: center; padding: 80px 24px;
|
||||
background: linear-gradient(135deg, #1a1a2e, #0f3460);
|
||||
}
|
||||
.hero h1 { font-size: 48px; color: #e94560; margin-bottom: 16px; }
|
||||
.hero p { font-size: 18px; color: #aaa; margin-bottom: 32px; }
|
||||
.hero .actions { display: flex; gap: 16px; justify-content: center; }
|
||||
|
||||
/* Script List */
|
||||
.script-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 24px; }
|
||||
.script-card:hover { border-color: #e94560; transform: translateY(-2px); transition: all 0.2s; }
|
||||
.script-card h3 { font-size: 18px; margin-bottom: 8px; }
|
||||
.script-card .tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
|
||||
.tag { padding: 4px 10px; border-radius: 4px; font-size: 12px; background: #0f3460; }
|
||||
.tag.difficulty { background: #e94560; }
|
||||
|
||||
/* Game Layout */
|
||||
.game-layout { display: grid; grid-template-columns: 200px 1fr 260px; height: 100vh; overflow: hidden; }
|
||||
.role-panel { background: #16213e; border-right: 1px solid #0f3460; padding: 16px; overflow-y: auto; }
|
||||
.role-panel h3 { color: #e94560; margin-bottom: 16px; font-size: 14px; }
|
||||
.role-item {
|
||||
padding: 10px; border-radius: 6px; margin-bottom: 8px; cursor: pointer;
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
}
|
||||
.role-item:hover { background: #0f3460; }
|
||||
.role-item .avatar {
|
||||
width: 36px; height: 36px; border-radius: 50%; background: #0f3460;
|
||||
display: flex; align-items: center; justify-content: center; font-size: 16px;
|
||||
}
|
||||
.role-item .status-dot { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.role-item .status-dot.active { background: #4caf50; }
|
||||
.role-item .status-dot.thinking { background: #ff9800; }
|
||||
|
||||
.chat-area { display: flex; flex-direction: column; height: 100vh; }
|
||||
.chat-header {
|
||||
padding: 12px 20px; background: #16213e; border-bottom: 1px solid #0f3460;
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
}
|
||||
.chat-header .phase-name { color: #e94560; font-weight: bold; }
|
||||
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
|
||||
.message {
|
||||
max-width: 80%; padding: 12px 16px; border-radius: 10px;
|
||||
line-height: 1.5; font-size: 14px;
|
||||
}
|
||||
.message.system { background: #0f3460; color: #ff9800; align-self: center; max-width: 90%; text-align: center; }
|
||||
.message.dm { background: #1a1a2e; border: 1px solid #e94560; align-self: flex-start; }
|
||||
.message.npc { background: #16213e; border: 1px solid #0f3460; align-self: flex-start; }
|
||||
.message.player { background: #e94560; color: #fff; align-self: flex-end; }
|
||||
.message .sender { font-size: 12px; opacity: 0.7; margin-bottom: 4px; }
|
||||
.chat-input {
|
||||
padding: 16px 20px; background: #16213e; border-top: 1px solid #0f3460;
|
||||
display: flex; gap: 12px;
|
||||
}
|
||||
.chat-input input { flex: 1; }
|
||||
|
||||
.right-panel { background: #16213e; border-left: 1px solid #0f3460; padding: 16px; overflow-y: auto; }
|
||||
.right-panel h3 { color: #e94560; margin-bottom: 16px; font-size: 14px; }
|
||||
.clue-card {
|
||||
background: #1a1a2e; border: 1px solid #0f3460; border-radius: 8px;
|
||||
padding: 12px; margin-bottom: 10px; cursor: pointer;
|
||||
}
|
||||
.clue-card:hover { border-color: #e94560; }
|
||||
.clue-card .clue-name { font-weight: bold; margin-bottom: 4px; }
|
||||
.clue-card .clue-desc { font-size: 13px; color: #aaa; }
|
||||
|
||||
/* Vote Modal */
|
||||
.modal-overlay {
|
||||
position: fixed; top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100;
|
||||
}
|
||||
.modal { background: #16213e; border-radius: 12px; padding: 32px; width: 480px; border: 1px solid #0f3460; }
|
||||
.modal h2 { margin-bottom: 20px; color: #e94560; }
|
||||
.vote-option {
|
||||
padding: 10px 16px; border: 1px solid #0f3460; border-radius: 8px;
|
||||
margin-bottom: 8px; cursor: pointer; display: flex; align-items: center; gap: 12px;
|
||||
}
|
||||
.vote-option:hover, .vote-option.selected { border-color: #e94560; background: #1a1a2e; }
|
||||
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
|
||||
|
||||
/* Replay */
|
||||
.replay-page { max-width: 800px; margin: 0 auto; padding: 24px; }
|
||||
.replay-page h1 { color: #e94560; margin-bottom: 24px; }
|
||||
.replay-truth { background: #16213e; border-radius: 10px; padding: 24px; margin-bottom: 24px; border: 1px solid #e94560; }
|
||||
.replay-truth h2 { color: #e94560; margin-bottom: 12px; }
|
||||
.replay-messages { display: flex; flex-direction: column; gap: 8px; }
|
||||
.replay-msg { padding: 8px 12px; border-radius: 6px; background: #16213e; font-size: 14px; }
|
||||
|
||||
nav {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
padding: 16px 24px; background: #16213e; border-bottom: 1px solid #0f3460;
|
||||
}
|
||||
nav .logo { font-size: 20px; font-weight: bold; color: #e94560; }
|
||||
nav .nav-links { display: flex; gap: 20px; align-items: center; }
|
||||
nav .nav-links a, nav .nav-links button { color: #e0e0e0; background: none; padding: 8px 12px; }
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar { width: 6px; }
|
||||
::-webkit-scrollbar-track { background: #1a1a2e; }
|
||||
::-webkit-scrollbar-thumb { background: #0f3460; border-radius: 3px; }
|
||||
Reference in New Issue
Block a user