html,
body {
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

.custom-modal {
    display: none;
    position: fixed !important;
    z-index: 10000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 8, 15, 0.85) !important;
    backdrop-filter: blur(8px) !important;

    justify-content: center !important;
    align-items: center !important;
}

.custom-modal-content {
    background: #1e293b !important;
    border: 2px solid #00e1ff !important;
    border-radius: 12px !important;
    padding: 30px !important;
    width: 90% !important;
    max-width: 400px !important;
    text-align: center !important;
    box-shadow: 0 0 30px rgba(0, 225, 255, 0.4) !important;
    color: white !important;
}

/* --- L'INPUT À L'INTÉRIEUR --- */
.modal-input {
    width: 100% !important;
    padding: 12px !important;
    margin: 15px 0 !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid #38bdf8 !important;
    color: white !important;
    border-radius: 8px !important;
    display: none;
}

/* --- LES BOUTONS --- */
.confirm-buttons {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    margin-top: 20px !important;
}

.btn-confirm {
    background: #ff4757 !important;
    color: white !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
}

.btn-cancel {
    background: #475569 !important;
    /*  */
    color: white !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

body {
    background-image: url("Bureau.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    /* Reset de base */
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

h1 {
    color: #00e1ff;
    font-size: clamp(32px, 8vw, 52px);
    text-align: center;
    margin-top: clamp(40px, 10vh, 80px);
    text-shadow: 0px 0px 10px rgba(40, 230, 255, 0.675);
    padding: 0 15px;
}

p {
    color: #9cecff;
    text-align: center;
    font-size: clamp(16px, 4vw, 20px);
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
}

/* --- INTRO & DESCRIPTION --- */
#intro-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.tagline {
    font-style: italic;
    color: #00e1ff;
    font-size: clamp(16px, 4vw, 22px);
    margin-top: -10px;
    text-shadow: 0 0 5px rgba(0, 225, 255, 0.4);
}

.game-description {
    background: rgba(10, 20, 30, 0.7);
    border: 1px solid rgba(0, 225, 255, 0.2);
    border-radius: 12px;

    width: 90%;
    max-width: 600px;

    margin: 30px auto;
    padding: 20px;
    text-align: left;
    backdrop-filter: blur(5px);
}

.game-description ul {
    list-style: none;
    padding-left: 0;
}

.game-description li {
    color: #9cecff;
    margin: 12px 0;
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.4;
    word-wrap: break-word;
}

#auth-section {
    background: rgba(10, 20, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 225, 255, 0.3);
    box-shadow: 0px 0px 20px rgba(0, 225, 255, 0.2);
    border-radius: 15px;

    width: 90%;
    max-width: 380px;

    margin: 40px auto;
    padding: 30px 20px;
    text-align: center;
}

#auth-section input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(0, 225, 255, 0.4) !important;
    color: #ffffff !important;
}

.game-description h3 {
    color: #ffffff;
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #00e1ff;
    padding-bottom: 10px;
}

.game-description strong {
    color: #ffffff;
}

#auth-section h3 {
    color: #00e1ff;
    font-size: clamp(20px, 5vw, 24px);
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 0px 0px 8px rgba(40, 230, 255, 0.5);
}



#auth-section input::placeholder {
    color: rgba(156, 236, 255, 0.6);
}

#auth-section input:focus {
    background: rgba(15, 23, 42, 1) !important;
    border: 1px solid #00e1ff !important;
    box-shadow: 0px 0px 10px rgba(0, 225, 255, 0.5) !important;
}

#auth-section button {
    display: inline-block;
    margin: 20px 5px 0 5px;
    padding: 12px 20px;
    font-size: 16px;
    width: 100%;
    background: linear-gradient(135deg, #1e88e5, #00d2ff) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    /* Les boutons d'action s'étendent sur mobile */
}

#auth-message {
    margin-top: 20px;
    font-size: 14px;
    font-weight: bold;
    padding: 0 10px;
}

/* --- STYLE DES ONGLETS (TABS) --- */
.auth-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 10px;
}

.auth-tabs button {
    margin: 0 !important;
    padding: 10px 20px !important;
    font-size: clamp(13px, 3.5vw, 14px) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    flex: 1;
}

#auth-section>button:hover,
#auth-section form button:hover {
    transform: scale(1.05);
    box-shadow: 0px 8px 15px rgba(0, 225, 255, 0.4) !important;
}

.auth-tabs button.active {
    background: linear-gradient(135deg, #1e88e5, #29b6f6) !important;
    color: white !important;
    border: 1px solid #00e1ff !important;
    box-shadow: 0px 0px 10px rgba(0, 225, 255, 0.5) !important;
}

/* --- BOUTON PRINCIPAL --- */
button.main-btn {
    display: block;
    margin: clamp(30px, 8vh, 60px) auto;
    padding: clamp(15px, 4vw, 20px) clamp(30px, 8vw, 50px);
    font-size: clamp(18px, 5vw, 24px);
    color: rgb(255, 255, 255);
    background: linear-gradient(45deg, #70afc0, #0072ff);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

button.main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.6);
}

button.main-btn:active {
    transform: scale(0.95);
}

/* --- FOOTER --- */
footer {
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(10, 20, 30, 0.5);
    backdrop-filter: blur(5px);
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.footer-actions button {
    margin: 0;
    width: 100%;
    max-width: 200px;
}

.footer-credits {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.footer-credits b {
    color: #00e1ff;
}

.version-tag {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.7;
}

/* --- AJUSTEMENTS SPÉCIFIQUES SMARTPHONES --- */
@media (max-width: 480px) {
    #auth-section {
        padding: 20px 15px;
    }

    .auth-tabs {
        flex-direction: column;
    }
}