/* odkryj-obrazek.css */

.game-header {
    background-color: #22a652;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.back-link {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin: 20px auto;
}

.setup-panel {
    max-width: 500px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #f9f9f9;
}

.btn-start, .btn-action {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

.btn-start:hover, .btn-action:hover {
    transform: scale(1.05);
    background: #ff5252;
}

.game-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.left-panel {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-height: 80vh;
    overflow-y: auto;
}

.right-panel {
    flex: 2;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.panel-header h2 {
    margin: 0;
    color: #333;
}

/* Tasks */
.task-group {
    margin-bottom: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.task-group-header {
    background: #f9f9f9;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.color-box {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid rgba(0,0,0,0.1);
}

.task-item {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    font-weight: bold;
    color: #444;
}

.task-item:last-child {
    border-bottom: none;
}

.task-input {
    width: 60px;
    padding: 5px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.task-input:focus {
    border-color: #22a652;
}

.task-input.error {
    border-color: #ff6b6b;
    background-color: #ffe3e3;
    animation: shake 0.4s;
}

.task-input.success {
    border-color: #51cf66;
    background-color: #e3fae9;
    color: #2b8a3e;
}

.task-item.solved {
    opacity: 0.6;
}

.task-item.active-search {
    background-color: #fff3bf;
    border-left: 4px solid #fcc419;
}

/* Grid */
.grid-container {
    overflow: auto;
    max-width: 100%;
}

.grid {
    display: grid;
    gap: 1px;
    background-color: #ccc;
    border: 2px solid #999;
}

.grid-header {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    padding: 5px;
    min-width: 30px;
    min-height: 30px;
}

.grid-cell {
    background-color: white;
    min-width: 30px;
    min-height: 30px;
    cursor: default;
    transition: background-color 0.3s;
}

.grid-cell.revealed {
    border: 1px solid rgba(0,0,0,0.1);
}

/* For mode 2 */
.grid-cell:hover {
    filter: brightness(0.95);
    cursor: pointer;
}

.error-pulse {
    animation: pulseRed 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulseRed {
    0% { background-color: white; }
    50% { background-color: #ff6b6b; }
    100% { background-color: white; }
}

/* End screen */
.end-panel {
    text-align: center;
    max-width: 500px;
}

.reveal-name {
    font-size: 24px;
    margin: 20px 0;
    color: #22a652;
}

.stats-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    font-size: 18px;
}

/* Admin */
.admin-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.color-picker-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
}

.color-picker-btn.active {
    border-color: #333;
    transform: scale(1.1);
}

#admin-grid .grid-cell {
    cursor: crosshair;
}

@media (max-width: 900px) {
    .game-area {
        flex-direction: column-reverse;
    }
    .left-panel, .right-panel {
        width: 100%;
        max-height: none;
    }
}
