/* Common styles for all pages */

:root {
    --primary-color: #111;
    --background-color: #aca7a7;
    --panel-color: #9a9a9a;
    --border-color: #666;
    --text-color: #222;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Trebuchet MS", sans-serif;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    justify-content: center;
    align-items: center;
}

.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-page .container {
    display: block;
    position: relative;
}

.home-page .game-area {
    display: none;
}

.home-page .sidebar {
    width: 100%;
    height: 100vh;
    align-items: center;
    text-align: center;
}

/* Common button styles */
button {
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid #111111;
    background-color: #f8f8f8;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover:not(:disabled) {
    background-color: #e8e8e8;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input styles */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #999;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

/* Authentication modal on the home page */
.auth-modal[hidden],
.auth-panel[hidden] {
    display: none;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.62);
}

.auth-modal-open {
    overflow: hidden;
}

.auth-modal-content {
    position: relative;
    width: min(100%, 390px);
    padding: 28px;
    border: 2px solid #111;
    border-radius: 10px;
    background: rgba(248, 248, 248, 0.97);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
}

.auth-tab.active {
    background: #222;
    color: #fff;
}

.auth-panel h2 {
    margin: 0 0 20px;
    text-align: center;
    font-size: 28px;
}

.auth-panel form {
    display: grid;
    gap: 8px;
}

.auth-panel label {
    margin-top: 6px;
    font-weight: bold;
}

.auth-panel input {
    width: 100%;
}

.auth-submit {
    width: 100%;
    margin-top: 14px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
