/* === RESET & OGÓLNE === */
* { box-sizing: border-box; }
body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    margin: 0; padding: 20px;
    color: #333;
}
.container {
    max-width: 600px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
h1, h2, h3 { text-align: center; color: #007BFF; }
/* === PRZYCISKI GÓRNE === */
.rules-button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}
.rules-btn, .coffee-btn-mini {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
}
.rules-btn {
    background: #28a745;
    color: white;
}
.rules-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}
.coffee-btn-mini {
    background: #8B4513; /* kawowy brąz */
    color: white;
}
.coffee-btn-mini:hover {
    background: #A0522D;
    transform: translateY(-2px);
}
/* === FORMULARZ === */
form { display: flex; justify-content: center; margin: 20px 0; }
form input {
    padding: 10px; font-size: 16px; width: 70%; border: 1px solid #ccc; border-radius: 4px;
}
form button {
    padding: 10px 20px; background: #28a745; color: white; border: none; border-radius: 4px; margin-left: 8px;
}
/* === LISTY === */
#colors, #move-history { list-style: none; padding: 0; }
#colors li, #move-history li {
    background: #e9ecef; margin: 6px 0; padding: 10px; border-radius: 6px;
}
#colors li { background: #f8d7da; }
/* === PRZYCISKI AKCJI === */
.action-buttons, .result-buttons {
    display: flex; justify-content: center; gap: 15px; margin: 20px 0;
}
button {
    padding: 12px 24px; font-size: 16px; background: #007BFF; color: white;
    border: none; border-radius: 6px; cursor: pointer; transition: 0.3s;
}
button:hover { background: #0056b3; }
/* === MODAL === */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
}
.modal-content {
    background: white; margin: 10% auto; width: 90%; max-width: 560px;
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); overflow: hidden;
    animation: slideIn 0.4s;
}
.modal-header {
    background: linear-gradient(135deg, #007BFF, #28a745);
    color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 {
    margin: 0; font-size: 1.5em; text-align: center; width: 100%; color: white !important;
}
.close { font-size: 28px; cursor: pointer; }
.modal-body { padding: 20px; line-height: 1.6; }
.modal-footer { text-align: center; padding: 15px; background: #f8f9fa; }
.close-btn {
    padding: 10px 30px; background: #007BFF; color: white; border: none;
    border-radius: 6px; cursor: pointer;
}
@keyframes slideIn { from {transform: translateY(-50px); opacity:0} to {transform: translateY(0); opacity:1} }
/* === INNE === */
.hidden { display: none; }
#current-draw { font-weight: bold; text-align: center; font-size: 1.2em; margin: 15px 0; }
.highlight { background: #ffff99; transition: background 1s; }
.pp-section { margin: 30px 0; text-align: center; }
footer { text-align: center; margin-top: 30px; font-size: 0.9em; color: #666; }
/* Responsywne przyciski górne */
@media (max-width: 500px) {
    .rules-button-container { flex-direction: column; }
    .coffee-btn-mini { margin: 10px 0 0; width: 100%; }
}
/* === ŁADNY BANNER CENEO === */
.pp-image {
    max-width: 340px;
    margin: 30px auto;
    text-align: center;
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: transform 0.3s;
}
.pp-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
.pp-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}
.ppimage-label {
    margin: 12px 0 0;
    font-size: 0.95em;
    color: #555;
    font-weight: 500;
}

/* === PŁYWAJĄCE OKNO ZASAD === */
.rules-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.rules-overlay.show {
    display: flex;
    opacity: 1;
}
.rules-container {
    position: relative;
    width: 90%;
    max-width: 700px;
    height: 80vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}
.rules-overlay.show .rules-container {
    transform: scale(1);
}
#rules-iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.close-rules-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px; height: 40px;
    background: none;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    
    transition: all 0.2s;
}
.close-rules-btn:hover {
    background: none;
    transform: scale(1.1);
}

/* MOBILNE: zasady na CAŁYM EKRANIE */
@media (max-width: 768px) {
    .rules-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        border-radius: 0 !important;
    }
}
