mirror of
https://github.com/DeNNiiInc/Connect-5.git
synced 2026-04-17 22:46:00 +00:00
Add complete multiplayer system with real-time gameplay, challenge system, and 50x50 board option
This commit is contained in:
455
multiplayer-styles.css
Normal file
455
multiplayer-styles.css
Normal file
@@ -0,0 +1,455 @@
|
||||
/* Mode Selector */
|
||||
.mode-selector {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding: 1.5rem;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--border-light);
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mode-btn {
|
||||
padding: 0.875rem 2rem;
|
||||
background: var(--bg-tertiary);
|
||||
border: 2px solid var(--border-light);
|
||||
border-radius: 12px;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.mode-btn:hover {
|
||||
border-color: var(--accent-primary);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.mode-btn.active {
|
||||
background: var(--accent-gradient);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Multiplayer Panel */
|
||||
.multiplayer-panel {
|
||||
display: grid;
|
||||
gap: 2rem;
|
||||
padding: 2rem;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
/* Player Stats Card */
|
||||
.player-stats-card {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
border: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
.player-stats-card h3 {
|
||||
color: var(--text-primary);
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
color: var(--accent-primary);
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Active Players Card */
|
||||
.active-players-card {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
border: 1px solid var(--border-light);
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
/* Board Size Selector for Multiplayer */
|
||||
.board-size-selector-mp {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
border: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
.board-size-selector-mp h3 {
|
||||
color: var(--text-primary);
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.size-btn-mp {
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: var(--bg-primary);
|
||||
border: 2px solid var(--border-light);
|
||||
border-radius: 12px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
}
|
||||
|
||||
.size-btn-mp:hover {
|
||||
border-color: var(--accent-primary);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
|
||||
}
|
||||
|
||||
.size-btn-mp.active {
|
||||
background: var(--accent-gradient);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
|
||||
}
|
||||
|
||||
/* Active Players Card */
|
||||
|
||||
.active-players-card h3 {
|
||||
color: var(--text-primary);
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.players-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.player-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
background: var(--bg-primary);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-light);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.player-item:hover {
|
||||
border-color: var(--accent-primary);
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.player-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.player-name {
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.player-stats {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.challenge-btn {
|
||||
padding: 0.5rem 1.25rem;
|
||||
background: var(--accent-gradient);
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
}
|
||||
|
||||
.challenge-btn:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
|
||||
}
|
||||
|
||||
.no-players,
|
||||
.loading {
|
||||
text-align: center;
|
||||
color: var(--text-secondary);
|
||||
padding: 2rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Return Button */
|
||||
.return-btn {
|
||||
padding: 1rem 2rem;
|
||||
background: var(--bg-tertiary);
|
||||
border: 2px solid var(--border-light);
|
||||
border-radius: 12px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.return-btn:hover {
|
||||
border-color: var(--accent-primary);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
|
||||
}
|
||||
|
||||
/* Username Modal */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(10, 14, 26, 0.95);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
backdrop-filter: blur(10px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2000;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.modal-overlay.active {
|
||||
opacity: 1;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: var(--bg-secondary);
|
||||
padding: 2.5rem;
|
||||
border-radius: 20px;
|
||||
border: 2px solid var(--accent-primary);
|
||||
box-shadow: 0 20px 60px rgba(147, 51, 234, 0.4);
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
transform: scale(0.9);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.modal-overlay.active .modal-content {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.username-modal h2 {
|
||||
font-size: 1.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
background: var(--accent-gradient);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.modal-subtitle {
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.username-modal input {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
background: var(--bg-tertiary);
|
||||
border: 2px solid var(--border-light);
|
||||
border-radius: 12px;
|
||||
color: var(--text-primary);
|
||||
font-size: 1rem;
|
||||
font-family: "Inter", sans-serif;
|
||||
margin-bottom: 1rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.username-modal input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent-primary);
|
||||
box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
|
||||
}
|
||||
|
||||
.error-message {
|
||||
color: var(--danger);
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.75rem;
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--danger);
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
padding: 1rem 2rem;
|
||||
background: var(--accent-gradient);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 700;
|
||||
font-size: 1.1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3);
|
||||
}
|
||||
|
||||
.submit-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 24px rgba(147, 51, 234, 0.5);
|
||||
}
|
||||
|
||||
/* Challenge Notification */
|
||||
.challenge-notification {
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
background: var(--bg-secondary);
|
||||
padding: 1.5rem;
|
||||
border-radius: 16px;
|
||||
border: 2px solid var(--accent-primary);
|
||||
box-shadow: 0 8px 32px rgba(147, 51, 234, 0.4);
|
||||
z-index: 1500;
|
||||
max-width: 350px;
|
||||
transform: translateX(400px);
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
.challenge-notification.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.challenge-content h3 {
|
||||
color: var(--text-primary);
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.challenge-content p {
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.challenge-actions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.accept-btn,
|
||||
.decline-btn {
|
||||
flex: 1;
|
||||
padding: 0.75rem;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-family: "Inter", sans-serif;
|
||||
}
|
||||
|
||||
.accept-btn {
|
||||
background: var(--success);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.accept-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
|
||||
}
|
||||
|
||||
.decline-btn {
|
||||
background: var(--danger);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.decline-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
|
||||
}
|
||||
|
||||
/* Status Message Variants */
|
||||
.status-message.success {
|
||||
border-color: var(--success);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.status-message.error {
|
||||
border-color: var(--danger);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.status-message.warning {
|
||||
border-color: #f59e0b;
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.status-message.info {
|
||||
border-color: var(--accent-secondary);
|
||||
color: var(--accent-secondary);
|
||||
}
|
||||
|
||||
/* Responsive Multiplayer Styles */
|
||||
@media (max-width: 768px) {
|
||||
.mode-selector {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mode-btn {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.multiplayer-panel {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.challenge-notification {
|
||||
right: 1rem;
|
||||
bottom: 1rem;
|
||||
max-width: calc(100% - 2rem);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
padding: 2rem 1.5rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user