body {
    background-color: #121417;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}



.hacking-container {
    text-align: center;
    background: #1e2229;
    padding: 20px;
    border: 3px solid #b8860b;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
}

h1 {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 2px 2px #000;
}

.game-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #00bfff;
    font-weight: bold;
}

.config-panel {
    margin-bottom: 15px;
    font-size: 12px;
    color: #ffd700;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.config-panel label {
    margin: 0 4px;
}

.config-panel input {
    width: 45px;
    background: #121417;
    color: #fff;
    border: 1px solid #b8860b;
    text-align: center;
    font-family: inherit;
    padding: 2px;
}

.game-main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
}

#grid-container {
    position: relative;
    display: inline-block;
    border: 2px solid #555;
    background: #0d1117;
}

canvas {
    display: block;
    cursor: pointer;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.clipboard-box {
    background: #121417;
    border: 2px solid #b8860b;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    width: 120px;
}

.clipboard-box h3 {
    font-size: 12px;
    color: #ffd700;
    margin: 0 0 8px 0;
}

.clipboard-hint {
    font-size: 10px;
    color: #888;
    margin-top: 8px;
}

#clipboardCanvas {
    background: #1e2229;
    border: 1px solid #444;
    margin: 0 auto;
    cursor: default;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-bioshock {
    background: linear-gradient(to bottom, #d4af37, #996515);
    color: #fff;
    border: 1px solid #ffd700;
    padding: 8px 16px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px #5c4000;
    transition: 0.1s;
}

.btn-bioshock:active {
    transform: translateY(2px);
    box-shadow: 0 2px #5c4000;
}

.hacking-container {
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

.game-main-layout {
    display: flex;
    flex-direction: column; /* Empile la grille et le presse-papier sur mobile */
    align-items: center;
    gap: 15px;
}

#grid-container {
    width: 100%;
    max-width: 500px; /* Largeur max sur PC */
    display: flex;
    justify-content: center;
}

/* Le canvas s'adapte à l'écran tout en gardant son ratio */
#hackingCanvas {
    width: 100% !important;
    max-width: 500px;
    height: auto !important;
    touch-action: manipulation; /* Évite les zooms indésirables sur mobile */
}

.sidebar {
    width: 100%;
    display: flex;
    justify-content: center;
}
