/* ===== STYLE.CSS - Tetris 1 na 1 ===== */

/* Reset i baza */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Pasek połączenia na górze */
.connection-bar {
    background: rgba(15, 52, 96, 0.95);
    padding: 15px 30px;
    color: white;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #e94560;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.connection-bar span {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
}

.connection-bar input {
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid transparent;
    background: #1a1a2e;
    color: white;
    width: 250px;
    font-size: 16px;
    transition: all 0.3s;
}

.connection-bar input:focus {
    outline: none;
    border-color: #00d4ff;
    background: #16213e;
}

.connection-bar input::placeholder {
    color: #6c757d;
}

.connection-bar button {
    padding: 10px 30px;
    border-radius: 30px;
    background: #e94560;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connection-bar button:hover {
    background: #ff6b6b;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* Kontener gry */
.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 30px;
    gap: 50px;
    flex-wrap: wrap;
}

/* Karta gracza */
.player {
    background: #0f3460;
    border-radius: 20px;
    padding: 25px 25px 20px 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e94560;
}

.player:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(233, 69, 96, 0.2);
}

.player.local {
    border: 2px solid #00d4ff;
}

.player.remote {
    border: 2px solid #e94560;
}

/* Wyświetlanie ID gracza */
.player-id-display {
    text-align: center;
    padding: 15px 20px;
    margin: -25px -25px 20px -25px;
    border-radius: 20px 20px 0 0;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid rgba(255,255,255,0.1);
    word-break: break-all;
}

.player.local .player-id-display {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border-bottom: 2px solid #00d4ff;
}

.player.remote .player-id-display {
    background: rgba(233, 69, 96, 0.2);
    color: #ff8a8a;
    border-bottom: 2px solid #e94560;
}

/* Canvas gry */
canvas {
    border: solid 3px #1a1a2e;
    width: 400px;
    height: 667px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

/* Wynik */
.score {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #00ff88;
    text-shadow: 0 0 15px #00ff88;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 10px;
}

/* Stopka */
.footer {
    text-align: center;
    padding: 20px;
    color: #8a8f99;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    margin-top: auto;
    border-top: 1px solid #e94560;
}

.footer kbd {
    background: #0f3460;
    padding: 5px 12px;
    border-radius: 8px;
    color: #00d4ff;
    margin: 0 5px;
    border: 1px solid #e94560;
    font-size: 16px;
}

.footer kbd.highlight {
    background: #e94560;
    color: white;
    border-color: #00d4ff;
}

/* Logo w stopce */
.logo-footer {
    position: fixed;
    bottom: 40px;
    right: 10px;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.logo-footer:hover {
    opacity: 1;
}

.logo-footer img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Wskaźnik statusu */
.status-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #0f3460;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    border: 1px solid #00d4ff;
    color: #00d4ff;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Style dla pauzy - używane w grze */
.local-pause-simple, .opponent-pause-simple {
    position: absolute !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    font-family: Arial, sans-serif !important;
    border-radius: 50px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.local-pause-simple {
    background: #00d4ff !important;
    color: black !important;
    border: 3px solid white;
}

.opponent-pause-simple {
    background: #e94560 !important;
    color: white !important;
    border: 3px solid yellow;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Responsywność */
@media (max-width: 1200px) {
    canvas {
        width: 320px;
        height: 533px;
    }
}

@media (max-width: 900px) {
    canvas {
        width: 280px;
        height: 467px;
    }
    
    .player-id-display {
        font-size: 14px;
    }
    
    .logo-footer {
        bottom: 20px;
        right: 5px;
    }
    
    .logo-footer img {
        width: 200px;
        height: auto;
    }
}

@media (max-width: 600px) {
    .connection-bar {
        flex-direction: column;
        padding: 15px;
    }
    
    .connection-bar input {
        width: 100%;
    }
    
    .status-indicator {
        top: 120px;
        right: 10px;
        font-size: 12px;
        padding: 5px 10px;
    }
}
/* Informacja o cookies */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 52, 96, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    z-index: 1000000;
    border-top: 2px solid #e94560;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cookie-consent.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #f0f0f0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cookie-btn-accept {
    background: #00d4ff;
    color: #1a1a2e;
    border: 2px solid #00d4ff;
}

.cookie-btn-accept:hover {
    background: transparent;
    color: #00d4ff;
}

.cookie-btn-decline {
    background: transparent;
    color: #e94560;
    border: 2px solid #e94560;
}

.cookie-btn-decline:hover {
    background: #e94560;
    color: white;
}

/* Responsywność */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}