Files
BreakEscape/public/break_escape/css/tutorial.css

516 lines
11 KiB
CSS
Raw Normal View History

/**
* Tutorial System Styles
* Matches BreakEscape's pixel-art aesthetic and design language
*/
/* Tutorial Prompt Modal */
.tutorial-prompt-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent; /* No overlay - game visible */
display: flex;
align-items: center;
justify-content: center;
z-index: 1400; /* Below minigames (1500+) but above objectives (1500) */
animation: fadeIn 0.3s ease-in;
pointer-events: none; /* Allow clicks through to game */
}
.tutorial-prompt-modal {
background: rgba(0, 0, 0, 0.95);
border: 2px solid #00ff88;
padding: 30px;
max-width: 500px;
width: 90%;
box-shadow: 0 0 30px rgba(0, 255, 136, 0.4),
0 0 10px rgba(0, 0, 0, 0.8);
animation: slideDown 0.4s ease-out;
position: relative;
pointer-events: all; /* Re-enable pointer events for modal content */
}
/* Subtle inner glow effect */
.tutorial-prompt-modal::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 1px solid rgba(0, 255, 136, 0.2);
pointer-events: none;
}
.tutorial-prompt-modal h2 {
color: #00ff88;
font-family: 'Press Start 2P', monospace;
font-size: 20px;
margin: 0 0 20px 0;
text-align: center;
text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
letter-spacing: 1px;
}
.tutorial-prompt-modal p {
color: #e0e0e0;
font-family: 'VT323', monospace;
font-size: 22px;
line-height: 1.6;
margin: 0 0 30px 0;
text-align: center;
}
.tutorial-prompt-buttons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}
.tutorial-btn {
font-family: 'Press Start 2P', monospace;
font-size: 12px;
padding: 12px 24px;
border: 2px solid;
cursor: pointer;
transition: all 0.2s ease;
text-transform: uppercase;
letter-spacing: 1px;
position: relative;
overflow: hidden;
}
.tutorial-btn-primary {
background: #00ff88;
color: #000;
border-color: #00ff88;
box-shadow: 0 2px 0 #00cc6a,
0 0 15px rgba(0, 255, 136, 0.3);
}
.tutorial-btn-primary:hover {
background: #00cc6a;
border-color: #00cc6a;
transform: translateY(-2px);
box-shadow: 0 4px 0 #00aa55,
0 0 20px rgba(0, 255, 136, 0.5);
}
.tutorial-btn-primary:active {
transform: translateY(0px);
box-shadow: 0 1px 0 #00cc6a,
0 0 15px rgba(0, 255, 136, 0.3);
}
.tutorial-btn-secondary {
background: rgba(0, 0, 0, 0.5);
color: #aaa;
border-color: #444;
box-shadow: 0 2px 0 #222;
}
.tutorial-btn-secondary:hover {
color: #fff;
border-color: #666;
background: rgba(0, 0, 0, 0.7);
transform: translateY(-2px);
box-shadow: 0 4px 0 #222;
}
.tutorial-btn-secondary:active {
transform: translateY(0px);
box-shadow: 0 1px 0 #222;
}
/* Tutorial Overlay */
.tutorial-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent; /* No overlay - game visible during tutorial */
z-index: 1400; /* Below minigames (1500+) but above objectives (1500) */
pointer-events: none;
animation: fadeIn 0.3s ease-in;
}
.tutorial-panel {
position: fixed;
bottom: 100px; /* Above the inventory bar (80px) with more clearance */
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.95);
border: 2px solid #00ff88;
padding: 20px 25px;
max-width: 650px;
width: 90%;
max-height: calc(100vh - 120px); /* Prevent going off top of screen */
overflow-y: auto; /* Scroll if content is too tall */
box-shadow: 0 0 30px rgba(0, 255, 136, 0.4),
0 4px 20px rgba(0, 0, 0, 0.8);
pointer-events: all;
animation: slideUp 0.4s ease-out;
}
/* Subtle inner glow effect */
.tutorial-panel::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 1px solid rgba(0, 255, 136, 0.2);
pointer-events: none;
z-index: -1;
}
/* Scrollbar for panel if content is too tall */
.tutorial-panel::-webkit-scrollbar {
width: 8px;
}
.tutorial-panel::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.3);
}
.tutorial-panel::-webkit-scrollbar-thumb {
background: rgba(0, 255, 136, 0.5);
border-radius: 4px;
}
.tutorial-panel::-webkit-scrollbar-thumb:hover {
background: rgba(0, 255, 136, 0.7);
}
.tutorial-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-bottom: 12px;
border-bottom: 2px solid #444;
}
.tutorial-progress {
color: #00ff88;
font-family: 'VT323', monospace;
font-size: 20px;
text-transform: uppercase;
letter-spacing: 2px;
text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}
.tutorial-skip {
background: rgba(0, 0, 0, 0.5);
color: #aaa;
border: 2px solid #444;
padding: 6px 14px;
font-family: 'VT323', monospace;
font-size: 18px;
cursor: pointer;
transition: all 0.2s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.tutorial-skip:hover {
color: #ff6b6b;
border-color: #ff6b6b;
background: rgba(255, 107, 107, 0.1);
box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}
.tutorial-title {
color: #00ff88;
font-family: 'Press Start 2P', monospace;
font-size: 18px;
margin: 0 0 15px 0;
text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
letter-spacing: 1px;
}
.tutorial-instruction {
color: #e0e0e0;
font-family: 'VT323', monospace;
font-size: 22px;
line-height: 1.5;
margin: 0 0 15px 0;
}
.tutorial-objective {
background: rgba(0, 255, 136, 0.1);
border-left: 4px solid #00ff88;
padding: 12px 16px;
margin: 15px 0;
position: relative;
}
/* Animated pulse effect for objectives */
@keyframes objective-pulse {
0%, 100% {
border-left-color: #00ff88;
box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}
50% {
border-left-color: #00cc6a;
box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}
}
.tutorial-objective {
animation: objective-pulse 2s ease-in-out infinite;
}
.tutorial-objective strong {
color: #00ff88;
font-family: 'Press Start 2P', monospace;
font-size: 13px;
display: block;
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 1px;
}
.tutorial-objective-text {
color: #fff;
font-family: 'VT323', monospace;
font-size: 20px;
line-height: 1.4;
}
.tutorial-actions {
display: flex;
justify-content: flex-end;
margin-top: 15px;
padding-top: 15px;
border-top: 2px solid #444;
}
.tutorial-next {
background: #00ff88;
color: #000;
border: 2px solid #00ff88;
padding: 10px 24px;
font-family: 'Press Start 2P', monospace;
font-size: 12px;
cursor: pointer;
transition: all 0.2s ease;
text-transform: uppercase;
letter-spacing: 1px;
position: relative;
box-shadow: 0 2px 0 #00cc6a,
0 0 15px rgba(0, 255, 136, 0.3);
}
.tutorial-next:hover {
background: #00cc6a;
border-color: #00cc6a;
transform: translateY(-2px);
box-shadow: 0 4px 0 #00aa55,
0 0 20px rgba(0, 255, 136, 0.5);
}
.tutorial-next:active {
transform: translateY(0px);
box-shadow: 0 1px 0 #00cc6a,
0 0 15px rgba(0, 255, 136, 0.3);
}
/* Completion indicator */
.tutorial-objective.completed {
border-left-color: #4ade80;
background: rgba(74, 222, 128, 0.1);
animation: none;
}
.tutorial-objective.completed strong {
color: #4ade80;
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideDown {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes slideUp {
from {
transform: translateX(-50%) translateY(50px);
opacity: 0;
}
to {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
}
/* Mobile Responsive */
@media (max-width: 768px) {
.tutorial-prompt-modal {
padding: 20px;
max-width: 95%;
}
.tutorial-prompt-modal h2 {
font-size: 16px;
margin-bottom: 15px;
letter-spacing: 0.5px;
}
.tutorial-prompt-modal p {
font-size: 20px;
margin-bottom: 20px;
}
.tutorial-prompt-buttons {
gap: 10px;
}
.tutorial-btn {
font-size: 10px;
padding: 10px 16px;
letter-spacing: 0.5px;
}
.tutorial-panel {
bottom: 100px; /* Still above inventory on mobile with clearance */
padding: 15px 18px;
max-width: 95%;
max-height: calc(100vh - 120px); /* Prevent going off screen on mobile */
}
.tutorial-header {
margin-bottom: 12px;
padding-bottom: 10px;
}
.tutorial-progress {
font-size: 18px;
letter-spacing: 1px;
}
.tutorial-skip {
font-size: 16px;
padding: 5px 10px;
}
.tutorial-title {
font-size: 14px;
margin-bottom: 12px;
letter-spacing: 0.5px;
}
.tutorial-instruction {
font-size: 20px;
margin-bottom: 12px;
}
.tutorial-objective {
padding: 10px 12px;
margin: 12px 0;
border-left-width: 3px;
}
.tutorial-objective strong {
font-size: 11px;
margin-bottom: 6px;
letter-spacing: 0.5px;
}
.tutorial-objective-text {
font-size: 18px;
}
.tutorial-actions {
margin-top: 12px;
padding-top: 12px;
}
.tutorial-next {
font-size: 10px;
padding: 8px 16px;
letter-spacing: 0.5px;
}
}
/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
.tutorial-prompt-modal,
.tutorial-panel {
border-width: 3px;
box-shadow: 0 0 40px rgba(0, 255, 136, 0.6),
0 4px 20px rgba(0, 0, 0, 1);
}
.tutorial-btn-primary {
font-weight: bold;
border-width: 3px;
}
.tutorial-objective {
border-left-width: 5px;
}
.tutorial-header,
.tutorial-actions {
border-width: 3px;
}
}
/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
.tutorial-prompt-overlay,
.tutorial-overlay,
.tutorial-prompt-modal,
.tutorial-panel,
.tutorial-btn,
.tutorial-next,
.tutorial-skip {
animation: none !important;
transition: none !important;
}
.tutorial-objective {
animation: none !important;
}
.tutorial-btn-primary:hover,
.tutorial-btn-secondary:hover,
.tutorial-next:hover,
.tutorial-skip:hover {
transform: none !important;
}
}
/* Focus states for keyboard navigation */
.tutorial-btn:focus,
.tutorial-next:focus,
.tutorial-skip:focus {
outline: 3px solid #00ff88;
outline-offset: 3px;
}
.tutorial-btn-secondary:focus {
outline-color: #aaa;
}