body {
    font-family: "Courier New";
    background-color: #f5f5f5;
    margin: 0;
    padding-top: 62px; /* Spazio per l'header fisso */
}

/* --- HEADER (identico a index.css) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 62px;
    background: #0d3b66;
    margin-bottom: 0 !important;
    padding: 10px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* --- LOGO (identico a index.css) --- */
.logo {
    position: absolute;
    left: 25px;
    top: 18px;
    font-size: 30px;
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
    background-color: transparent;
    text-shadow: none;
    z-index: 1;
}

/* --- NAVBAR (identica a index.css) --- */
nav {
    position: absolute;
    right: 35px;
    top: 22px;
    z-index: 9999;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

nav a, nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    transition: .25s;
    background-color: transparent;
    text-shadow: none;
}

nav a:hover, nav ul li a:hover {
    color: #8fd3ff;
}

/* --- FOOTER / CONTATTI (identico a index.css) --- */
#contatti, footer {
    margin-top: 60px;
    background: #0d3b66;
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 1rem;
    line-height: normal;
}

#contatti a, footer a {
    color: #8fd3ff;
    text-decoration: none;
}

#contatti a:hover, footer a:hover {
    text-decoration: underline;
}

/* Container principale: si adatta completamente alla larghezza del form */
#container {
    width: 100%;                 
    max-width: 100%;             
    margin: auto;
    padding: 10px;               
    box-sizing: border-box;      
}

/* Contenitore interno della regola */
#ruleContainer {
    font-size: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;                 
    margin: 0 auto 10px auto; 
    gap: 0px;
    box-sizing: border-box;
}

/* Titolo del test */
#lblTest {
    font-size: 32px;
    background-color: oldlace;
    border: 3px solid #ccc;
    padding: 8px 15px;
    color: olive;
    width: fit-content;
    margin: 20px 0 10px 0;
}

/* Descrizione iniziale (spazi ridotti) */
.main-content {
    pointer-events: none;
    margin: 0 0 10px 0;
    padding: 0;
}

.main-content p {
    margin: 0 0 5px 0;
    line-height: 1.3;
}

/* Etichetta REGOLA */
#lblNickName {
    font-size: 20px;
    font-weight: bold;
    background-color: green;
    margin-bottom: 0;
    text-align: center;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Regola */
#label1 {
    font-weight: bold;
    font-size: 34px;
    padding: 10px;
    margin: 5px 5px;
    background-color: #f0f0f0;
    border: 2px solid #999;
    border-radius: 10px;
    white-space: pre-wrap;
    width: 100%;
    text-align: center;
}

/* Risposta scelta */
#label2 {
    font-weight: bold;
    font-size: 34px;
    padding: 5px 5px;
    background-color: yellow;
    color: red;
    border: 2px solid #666;
    border-radius: 10px;
    margin-right: 0px;
}

/* Contatore Test n° (spazi ridotti) */
#testCounterContainer {
    margin: 5px 0 5px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
}

/* ================================
   BOX SINISTRA + DESTRA (spazi ridotti)
   ================================ */
#mainRow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 90%;
    margin: 0px auto;
    pointer-events: none;
}

#mainRow input,
#mainRow label {
    pointer-events: auto;
}

/* BOX SINISTRA: RADIO */
#radioContainer {
    width: 60%;
    background-color: #fff8f8;
    border: 2px solid #fb8888;
    border-radius: 10px;
    padding: 15px 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#radioContainer label {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: red;
}

#radioContainer span {
    font-family: Consolas, "Courier New", monospace;
    font-size: 30px;
    letter-spacing: 6px;
}

/* BOX DESTRA: CHECKBOX */
#checkContainer {
    width: 45%;
    background-color: #f0f8ff;
    border: 2px solid #cce0ff;
    border-radius: 10px;
    padding: 15px 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#checkContainer label {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: blue;
}

#checkContainer span {
    font-family: Consolas, "Courier New", monospace;
    font-size: 30px;
}

/* ================================
   PULSANTI E SOLUZIONE (spazi ridotti)
   ================================ */

#buttons {
    margin-top: 15px;
}

#buttons button {
    font-size: 20px;
    margin-right: 10px;
    padding: 8px 18px;
}

/* TextBox soluzione */
#textBox1 {
    width: 300px;
    height: 70px;
    margin-top: 10px;
    font-size: 20px;
    font-family: "Courier New", monospace;
    display: none;
}

/* FOTO (se usata) */
#pictureBox1 {
    width: 200px;
    height: 300px;
    border: 3px solid #333;
    position: absolute;
    right: 20px;
    top: 20px;
}

/* TOP RIGHT LINKS */
.top-links {
    position: absolute;
    top: 20px;
    right: 20px;
}

.top-links a {
    font-weight: bold;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
}

.top-links a:first-child {
    color: #0077cc;
}

.top-links a:last-child {
    color: #d00;
}

/* Media query dispositivi mobili coerente con index.css */
@media(max-width:900px){
    .logo {
        position: static;
        text-align: center;
        margin-top: 5px;
    }
    nav {
        position: static;
        margin-top: 10px;
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    .header {
        height: auto;
        padding-bottom: 20px;
    }
}
