/* ==== Seite: tetris ==== */

/* Reset der globalen Karten-Komponente für den Spiel-Container */

/* Main Card */

body.page-tetris .card-header {

            text-align: center;
            margin-bottom: 30px;
        
}

body.page-tetris .card-header h1 {

            font-family: 'Press Start 2P', monospace;
            font-size: 1.9em;
            letter-spacing: 2px;
            color: #00e5ff;
            margin-bottom: 12px;
            text-shadow: 0 0 12px rgba(0, 229, 255, 0.6), 0 0 32px rgba(0, 229, 255, 0.3), 3px 3px 0 #111;
        
}

body.page-tetris .card-header h1 i {

            display: inline-block;
            transform: translateY(-8px);
        
}

body.page-tetris .card-header p {

            color: var(--c-muted);
            font-size: 1.1em;
        
}

/* Score Board */

body.page-tetris .score-board {

            display: flex;
            justify-content: space-around;
            margin-bottom: 20px;
            padding: 22px 20px;
            background: linear-gradient(135deg, #f0f3ff 0%, #f8f9ff 100%);
            border: 1px solid var(--c-border);
            border-radius: 16px;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.10);
            flex-wrap: wrap;
            gap: 10px;
        
}

body.page-tetris .score-item {

            text-align: center;
        
}

body.page-tetris .score-label {

            font-size: 13px;
            font-weight: 600;
            color: var(--c-muted);
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 6px;
        
}

body.page-tetris .score-value {

            font-family: 'Press Start 2P', monospace;
            font-size: 1.4em;
            letter-spacing: 1px;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        
}

body.page-tetris .score-yellow {
 color: #ffe100; text-shadow: 0 0 10px rgba(255, 225, 0, 0.55); 
}

body.page-tetris .score-cyan {
 color: #00e5ff; text-shadow: 0 0 10px rgba(0, 229, 255, 0.55); 
}

body.page-tetris .score-magenta {
 color: #ff4fd8; text-shadow: 0 0 10px rgba(255, 79, 216, 0.55); 
}

body.page-tetris .score-green {
 color: #39ff14; text-shadow: 0 0 10px rgba(57, 255, 20, 0.55); 
}

/* Game Container - Layout mit Spielfeld zentriert und Vorschau rechts */

body.page-tetris .game-area {

            display: flex;
            justify-content: center;
            align-items: flex-start;
            gap: 14px;
            margin-bottom: 20px;
        
}

body.page-tetris .game-container {

            position: relative;
            display: flex;
            justify-content: center;
        
}

body.page-tetris #gameCanvas {

            border: 4px solid #0a0a0a;
            border-radius: 14px;
            background: #1a1a1a;
            box-shadow:
                0 0 0 2px rgba(0, 229, 255, 0.35),
                0 0 18px rgba(0, 229, 255, 0.25),
                0 0 40px rgba(255, 79, 216, 0.3),
                0 14px 34px rgba(0, 0, 0, 0.45);
            max-width: 100%;
            height: auto;
            image-rendering: pixelated;
        
}

/* Next Piece / Hold Preview - rechts am Rand */

body.page-tetris .side-panel {

            display: flex;
            flex-direction: column;
            gap: 14px;
            flex-shrink: 0;
        
}

body.page-tetris .next-piece {

            border-radius: 12px;         
            text-align: center;
            flex-shrink: 0;
        
}

body.page-tetris .next-piece h3 {

            font-size: 0.85em;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 10px;
            color: var(--c-muted);
        
}

body.page-tetris #nextCanvas, body.page-tetris #holdCanvas {

            border: 3px solid #0a0a0a;
            border-radius: 8px;
            background: #1a1a1a;
            margin: 0 auto;
            box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
        
}

/* Game Status */

body.page-tetris .game-status {

            text-align: center;
            font-size: 1.15em;
            font-weight: 600;
            color: var(--c-surface-2);
            margin-bottom: 20px;
            padding: 16px 20px;
            background: linear-gradient(135deg, #f0f3ff 0%, #f8f9ff 100%);
            border: 1px solid var(--c-border);
            border-radius: 14px;
        
}

body.page-tetris .game-status.game-over {

            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            border-color: transparent;
            color: white;
        
}

/* Controls */

body.page-tetris .controls {

            display: flex;
            gap: 15px;
            justify-content: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
        
}

body.page-tetris .control-btn {

            padding: 15px 30px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        
}

body.page-tetris .control-btn:hover {

            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
        
}

body.page-tetris .control-btn:active {

            transform: translateY(0);
        
}

body.page-tetris #musicToggle {

            text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
        
}

/* Level Selection */

body.page-tetris .level-selection {

            margin-bottom: 10px;
            text-align: center;
        
}

body.page-tetris .level-buttons {

            display: inline-flex;
            gap: 4px;
            justify-content: center;
            background: var(--c-surface-2);
            padding: 5px;
            border-radius: 50px;
            border: 1px solid var(--c-border);
        
}

body.page-tetris .level-btn {

            padding: 8px 18px;
            background: transparent;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: var(--c-muted);
            transition: all 0.3s;
        
}

body.page-tetris .level-btn:hover {

            color: var(--c-accent);
        
}

body.page-tetris .level-btn.active {

            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        
}

/* Mobile Controls */

body.page-tetris .mobile-controls {

            display: none;
            justify-content: space-between;
            align-items: center;
            max-width: 380px;
            margin: 20px auto;
            gap: 15px;
        
}

body.page-tetris .mobile-controls-left, body.page-tetris .mobile-controls-right {

            display: flex;
            flex-direction: column;
            gap: 10px;
        
}

body.page-tetris .mobile-controls-right {

            flex-direction: row;
        
}

body.page-tetris .mobile-controls-center {

            display: flex;
            flex-direction: column;
            gap: 10px;
            align-self: stretch;
            flex-grow: 1;
            max-width: 80px;
        
}

body.page-tetris .mobile-btn.hold {

            flex-shrink: 0;
        
}

body.page-tetris .mobile-btn.harddrop {

            flex-grow: 1;
            width: 100%;
        
}

body.page-tetris .mobile-controls.force-show {

            display: flex !important;
        
}

body.page-tetris .mobile-btn {

            padding: 20px;
            background: var(--c-accent);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 24px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        
}

body.page-tetris .mobile-btn:active {

            transform: scale(0.95);
        
}

/* Start Overlay Button */

body.page-tetris .start-overlay {

            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            font-size: 32px;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            transition: all 0.3s;
            z-index: 10;
        
}

body.page-tetris .start-overlay:hover {

            transform: translateX(-50%) scale(1.1);
            box-shadow: 0 6px 30px rgba(0,0,0,0.6);
        
}

body.page-tetris .start-overlay.hidden {

            display: none;
        
}

@media (max-width: 768px) {
body.page-tetris .mobile-controls {

                display: flex;
            
}
body.page-tetris .start-overlay {

                width: 80px;
                height: 80px;
                font-size: 36px;
            
}
}

/* Info Section */

body.page-tetris .info-icon {

            font-size: 24px;
        
}

body.page-tetris .info-text {

            flex: 1;
            font-size: 14px;
            color: var(--c-accent);
            font-weight: 600;
        
}

/* SEO Section */

/* Back to Top Button */

/* Responsive */

@media (max-width: 768px) {
body.page-tetris .card-header h1 {

                font-size: 1.4em;
            
}
body.page-tetris .score-board {

                flex-direction: column;
                gap: 15px;
            
}
body.page-tetris .game-area {

                flex-direction: row;
                align-items: flex-start;
                justify-content: center;
                flex-wrap: nowrap;
                gap: 8px;
            
}
body.page-tetris .game-container {

                flex-shrink: 0;
            
}
body.page-tetris .side-panel {

                gap: 8px;
            
}
body.page-tetris .next-piece {

                min-width: 70px;
                flex-shrink: 0;
                align-self: flex-start;
            
}
body.page-tetris .next-piece h3 {

                font-size: 0.65em;
                margin-top: 5px;
            
}
body.page-tetris #nextCanvas, body.page-tetris #holdCanvas {

                width: 60px;
                height: 60px;
            
}
body.page-tetris #gameCanvas {

                max-width: 300px;
                height: auto;
            
}
/* Smaller buttons on mobile */
body.page-tetris .controls {

                gap: 8px;
            
}
body.page-tetris .control-btn {

                padding: 10px 18px;
                font-size: 14px;
                border-radius: 10px;
            
}
}

/* Dark Theme */

body.dark-theme.page-tetris .card-header h1 {

            color: #00e5ff;
            text-shadow: 0 0 12px rgba(0, 229, 255, 0.6), 0 0 32px rgba(0, 229, 255, 0.3), 3px 3px 0 #111;
        
}

body.dark-theme.page-tetris .card-header p {

            color: var(--c-muted);
        
}

body.dark-theme.page-tetris .score-board {

            background: none;
            border-color: var(--c-border);
        
}

body.dark-theme.page-tetris .score-label {

            color: var(--c-muted);
        
}

body.dark-theme.page-tetris .score-value {

            background: linear-gradient(135deg, #8b9cf7 0%, #a78bfa 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        
}

body.dark-theme.page-tetris .score-yellow {
 color: #ffe100; text-shadow: 0 0 10px rgba(255, 225, 0, 0.55); 
}

body.dark-theme.page-tetris .score-cyan {
 color: #00e5ff; text-shadow: 0 0 10px rgba(0, 229, 255, 0.55); 
}

body.dark-theme.page-tetris .score-magenta {
 color: #ff4fd8; text-shadow: 0 0 10px rgba(255, 79, 216, 0.55); 
}

body.dark-theme.page-tetris .score-green {
 color: #39ff14; text-shadow: 0 0 10px rgba(57, 255, 20, 0.55); 
}

body.dark-theme.page-tetris .game-status {

            background: none;
            border-color: var(--c-border);
            box-shadow:  0 6px 20px rgba(102, 126, 234, 0.10);
            color: var(--c-text);
        
}

body.dark-theme.page-tetris .next-piece {

            padding: 0;
        
}

body.dark-theme.page-tetris .next-piece h3 {

            color: var(--c-text);
        
}

body.dark-theme.page-tetris .level-buttons {

            background: var(--c-surface)00;
            border-color: var(--c-border);
        
}

body.dark-theme.page-tetris .level-btn {

            color: var(--c-muted);
        
}

body.dark-theme.page-tetris .level-btn:hover {

            color: var(--c-accent);
        
}

body.dark-theme.page-tetris .info-text {

            color: var(--c-accent);
        
}

/* Hidden class for search filtering */
