.main {
    font-size: 40px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.spot {
    border: solid 2px black;
    color: white;
    margin-right: 2px;
    width: 1em;
    height: 1em;
}
.piece {
    color: black;
}
.selected-origin {
    border-color: greenyellow;
}
.selected-target {
    border-color: red;
}
.hidden {
    display: none;
}
.ready-button {
    background-color: blue;
    color: white;
    border-radius: 5em;
    border-width: 0;
}
.disabled {
    opacity: 0.5;
}
.finish {
    color: red;
}
#secret {
    font-size: 20px;
    border-radius: 2em;
    border-width: 3px;
    height: 2em;
    width: 20em;
}
#bottom-holder {
    width: 100%;
    display: table;
}
#bottom-row-holder {
    display: table-row;
}
#log-holder {
    font-size: 20px;
    width: 50%;
    display: table-cell;
}
#chat-holder {
    font-size: 20px;
    display: table-cell;
}
#info {
    font-size: 20px;
}
.dotted {
    border-style: dashed;
}
.dotted.attacker {
    border-color: teal;
}
.dotted.defender {
    border-color: maroon;
}
.attacker.piece {
    color: teal;
}
.defender.piece {
    color: maroon;
}
.attacker.role {
    color: teal;
}
.defender.role {
    color: maroon;
}
.row-indicator {
    font-size: 14px;
    float: left;
}
.dotted.attacker.selected-origin {
    border-color: greenyellow;
}
.dotted.defender.selected-origin {
    border-color: greenyellow;
}
.dotted.attacker.selected-target {
    border-color: red;
}
.dotted.defender.selected-target {
    border-color: red;
}
.attacker-message {
    color: teal;
}
.defender-message {
    color: maroon;
}
#wtf-content {
    display: none;
    font-size: 12px;
}
.turn-indicator {
    display: none;
}
/* Three-phase move selection visual feedback */
.valid-move {
    background-color: rgba(144, 238, 144, 0.3);
    box-shadow: 0 0 8px rgba(144, 238, 144, 0.6);
    cursor: pointer;
}
.valid-move:hover {
    background-color: rgba(144, 238, 144, 0.5);
    box-shadow: 0 0 12px rgba(144, 238, 144, 0.8);
}
.path-selected {
    background-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}
.selected-origin {
    border-color: greenyellow;
    box-shadow: 0 0 10px greenyellow;
    border-width: 3px;
}
.selected-target {
    border-color: orange;
    border-width: 3px;
}

/* Approach direction arrows for path selection */
.approach-direction {
    background-color: rgba(255, 165, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
    cursor: pointer;
    position: relative;
    animation: pulse-arrow 1.2s ease-in-out infinite;
}

.approach-direction:hover {
    background-color: rgba(255, 165, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.9);
}

@keyframes pulse-arrow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 165, 0, 1);
    }
}

/* Directional arrows using pseudo-elements */
.approach-direction::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    font-weight: bold;
    color: rgba(255, 69, 0, 0.9);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.approach-up::after {
    content: '↑';
}

.approach-down::after {
    content: '↓';
}

.approach-left::after {
    content: '←';
}

.approach-right::after {
    content: '→';
}

/* Authentication Screen Styles */
.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
}

.auth-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 32px;
}

.auth-container h2 {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
    font-size: 24px;
}

.auth-container h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
}

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

.auth-form input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    background-color: #fee;
    color: #c33;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #fcc;
}

#user-info-screen {
    text-align: center;
}

#user-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#user-stats p {
    margin: 8px 0;
    font-size: 16px;
    color: #555;
}

#user-stats span {
    font-weight: bold;
    color: #667eea;
}

.secret-container {
    margin: 20px 0;
}

.secret-container input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.toggle-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #e0e0e0;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Leaderboard Table */
#leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#leaderboard-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#leaderboard-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    position: relative;
}

#leaderboard-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

#leaderboard-table th .sort-icon {
    margin-left: 5px;
    opacity: 0.3;
    font-size: 12px;
}

#leaderboard-table th.active .sort-icon {
    opacity: 1;
}

#leaderboard-table th.asc .sort-icon::before {
    content: '▲';
}

#leaderboard-table th.desc .sort-icon::before {
    content: '▼';
}

#leaderboard-table th.asc .sort-icon,
#leaderboard-table th.desc .sort-icon {
    display: inline;
}

#leaderboard-table th:not(.active) .sort-icon {
    visibility: hidden;
}

#leaderboard-table th.sortable:hover .sort-icon {
    visibility: visible;
    opacity: 0.5;
}

#leaderboard-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

#leaderboard-table tbody tr:hover {
    background-color: #f8f9fa;
}

#leaderboard-table tbody tr.current-user {
    background-color: #fff3cd;
    font-weight: bold;
}

#leaderboard-table tbody tr.current-user:hover {
    background-color: #ffe69c;
}

#leaderboard-table td {
    padding: 10px 8px;
    text-align: center;
}

#leaderboard-table td:first-child {
    text-align: left;
    padding-left: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #leaderboard-table {
        font-size: 12px;
    }
    
    #leaderboard-table th,
    #leaderboard-table td {
        padding: 8px 4px;
    }
}

#user-stats-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}
