/* ==== Seite: pentago ==== */

/* Farbpunkte im Score-Board (Rot/Blau) – .score-label darf Grau nicht überschreiben */
body.page-pentago .score-label.color-red { color: var(--c-danger); }
body.page-pentago .score-label.color-blue { color: #3b82f6; }
body.dark-theme.page-pentago .score-label.color-red { color: #ef4444; }
body.dark-theme.page-pentago .score-label.color-blue { color: #3b82f6; }

/* Schwierigkeits-Auswahl (KI-Modus) – gleicher Stil wie die Controls */
body.page-pentago #pgDiffWrap {
    width: fit-content;
}
body.page-pentago #pgDiffOpt.controls {
    gap: 6px;
    padding: 5px 8px;
    width: fit-content;
}
body.page-pentago #pgDiffOpt.controls .control-btn {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 14px;
    font-size: 13px;
}
body.page-pentago #pgDiffOpt.controls .control-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
body.page-pentago #pgDiffOpt.controls .control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Farbpunkte vor den Schwierigkeitsgraden (grün/gelb/rot) */
body.page-pentago #pgDiffEasy::before,
body.page-tictactoe #diffEasyBtn::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 6px;
    flex-shrink: 0;
}
body.page-pentago #pgDiffMedium::before,
body.page-tictactoe #diffMediumBtn::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5b301;
    margin-right: 6px;
    flex-shrink: 0;
}
body.page-pentago #pgDiffHard::before,
body.page-tictactoe #diffHardBtn::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-danger);
    margin-right: 6px;
    flex-shrink: 0;
}

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

/* Main Card */

body.page-pentago .card-header {

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

body.page-pentago .card-header h1 {

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

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

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

body.page-pentago .card-header p {

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

/* Score Board */

body.page-pentago .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-pentago .score-item {

            text-align: center;
        
}

body.page-pentago .score-label {

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

body.page-pentago .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-pentago .score-yellow {
 color: #ffe100; text-shadow: 0 0 10px rgba(255, 225, 0, 0.55); 
}

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

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

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

/* Game Status */

body.page-pentago .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-pentago .game-status.win {

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

body.page-pentago .game-status.draw {

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

/* Controls */

body.page-pentago .controls {

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

body.page-pentago .btn {

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

body.page-pentago .btn:hover {

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

body.page-pentago .btn:active {

            transform: translateY(0);
        
}

body.page-pentago .btn:disabled {

            background: var(--c-surface-2);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        
}

body.page-pentago #undoBtn:disabled {

            background: var(--c-surface-2);
            color: var(--c-muted);
            border: 1px dashed var(--c-border);
            box-shadow: none;
            transform: none;
            cursor: not-allowed;
            opacity: 1;
        
}

body.dark-theme.page-pentago #undoBtn:disabled {

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

body.page-pentago #musicToggle {

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

/* Pentago Board */

body.page-pentago .game-container {

            display: flex;
            justify-content: center;
            margin-bottom: 10px;
        
}

body.page-pentago .pentago-layout {

            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 460px;
            gap: 8px;
        
}

body.page-pentago .board-container {

            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 10px;
            border-radius: 16px;
            width: 100%;
            box-sizing: border-box;
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        
}

body.page-pentago .knob-row {

            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            width: 100%;
            box-sizing: border-box;
        
}

body.page-pentago .quadrant {

            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            width: 100%;
            box-sizing: border-box;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        
}

body.page-pentago .quadrant.active-quadrant {

            box-shadow: 0 0 0 3px #8b5cf6;
        
}

body.page-pentago .rotate-controls {

            display: flex;
            gap: 10px;
            width: 100%;
            justify-content: center;
        
}

body.page-pentago .rotate-btn {

            background: var(--c-surface-2);
            color: var(--c-text);
            border: 2px solid var(--c-border);
            border-radius: 8px;
            padding: 12px 20px;
            font-size: 1.4rem;
            min-width: 56px;
            min-height: 56px;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        
}

body.page-pentago .rotate-btn:hover:not(:disabled) {

            background: var(--c-surface-2);
            border-color: #8b5cf6;
        
}

body.page-pentago .rotate-btn:disabled {

            opacity: 0.3;
            cursor: not-allowed;
        
}

body.page-pentago .board-container .cell {

            aspect-ratio: 1 / 1;
            width: 100%;
            background: var(--c-surface-2);
            border: 2px solid var(--c-border);
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, transform 0.1s;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        
}

body.page-pentago .board-container .cell:hover:not(:disabled) {

            border-color: #94a3b8;
        
}

body.page-pentago .board-container .cell.p1 {

            background: var(--c-danger);
            border-color: #b91c1c;
            box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4);
        
}

body.page-pentago .board-container .cell.p2 {

            background: #3b82f6;
            border-color: #1d4ed8;
            box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4);
        
}

body.page-pentago .board-container .cell.winner {

            animation: winPulse 0.6s ease-in-out infinite;
        
}

@keyframes winPulse {

            0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8); }
            50% { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255, 215, 0, 0.8); }
        
}

@media (prefers-reduced-motion: reduce) {
body.page-pentago .board-container .cell.winner {

                animation: none;
            
}
body.page-pentago .quadrant {

                transition: none !important;
            
}
}

/* Info Section */

body.page-pentago .info-icon {

            font-size: 24px;
        
}

body.page-pentago .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-pentago .card-header h1 {

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

                flex-direction: column;
                gap: 15px;
            
}
/* Smaller buttons on mobile */
body.page-pentago .controls {

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

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

/* Dark Theme */

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

            color: #ff4fd8;
            text-shadow: 0 0 12px rgba(255, 79, 216, 0.6), 0 0 32px rgba(255, 79, 216, 0.3), 3px 3px 0 #111;
        
}

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

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

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

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

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

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

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

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

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

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

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

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

body.dark-theme.page-pentago .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-pentago .board-container {

            background: linear-gradient(135deg, #4c5cbf 0%, #5d3f9e 100%);
        
}

body.dark-theme.page-pentago .quadrant {

            background: transparent;
        
}

body.dark-theme.page-pentago .quadrant.active-quadrant {

            box-shadow: 0 0 0 3px #8b5cf6;
        
}

body.dark-theme.page-pentago .rotate-btn {

            background: var(--c-surface);
            color: var(--c-text);
            border-color: #334155;
        
}

body.dark-theme.page-pentago .rotate-btn:hover:not(:disabled) {

            background: var(--c-surface-2);
        
}

body.dark-theme.page-pentago .board-container .cell {

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

body.dark-theme.page-pentago .board-container .cell:hover:not(:disabled) {

            border-color: #94a3b8;
        
}

body.dark-theme.page-pentago .board-container .cell.p1 {

            background: #ef4444;
            border-color: #b91c1c;
            box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4);
        
}

body.dark-theme.page-pentago .board-container .cell.p2 {

            background: #3b82f6;
            border-color: #1d4ed8;
            box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4);
        
}

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

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

/* Hidden class for search filtering */
