#loginBtn-icon {
    display: inline;
    align-items: center;
    background: #fff;
    border-radius: 2px;
    padding: 0;
    vertical-align: middle;
}

#loginBtn-text {
    font-family: 'Roboto', Arial, sans-serif;
}
/* Hamburger menu styles */
.hamburger-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}
/* Login button styles */
#loginBtn {
    margin-right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    padding: 0 24px 0 8px;
    height: 40px;
    box-shadow: 0 1px 2px rgba(60,64,67,.08), 0 1.5px 6px rgba(60,64,67,.08);
    cursor: pointer;
    transition: box-shadow .2s;
}
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 8px;
}
.hamburger-bar {
    width: 26px;
    height: 4px;
    background: #fff;
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}
.hamburger-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: rgba(181, 136, 99, 0.93);
    border-style: solid;
    border-color: rgba(65, 49, 36, 0.93);
    color: #fff;
    min-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    flex-direction: column;
    padding: 8px 0;
    max-height: calc(8 * 40px);
    overflow-y: auto;
}
.hamburger-dropdown.show {
    display: flex;
}
.hamburger-menuitem {
    padding: 10px 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    text-align: left;
    width: 280px;
    cursor: pointer;
}
/* Make the keyboardHelpBtn look like normal text in the hamburger menu */
#keyboardHelpBtn.hamburger-menuitem {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: 16px;
    padding: 10px 20px;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.hamburger-menuitem:hover {
    background: #a0764b;
}

#keyboardHelpBtn.hamburger-menuitem:hover {
    background: #a0764b;
}
/* Navbar styled to match dark chessboard square */
.navbar {
    background: #f0d9b5;
    color: #fff;
    width: 100%;
    margin: 0;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    box-sizing: border-box;
    border: none;
}
/* Header flex row for logo and title */
.header-flex-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.logo-area {
    width: auto;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}
.chesslines-logo {
    width: 80px;
    max-width: 18vw;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
    margin-bottom: 0;
}
/* Logo styling for chesslinesLogo.png */
.logo-area {
    width: 100%;
    text-align: center;
    margin-top: 24px;
    margin-bottom: 0px;
}
.chesslines-logo {
    width: 180px;
    max-width: 90vw;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
    margin-bottom: 8px;
}
/* Highlight for invalid drop target square */
.highlight-drop-invalid {
    box-shadow: 0 0 0 4px #ff4d4d inset, 0 0 10px 2px #ff4d4d;
    background: #ffb3b3 !important;
    transition: background 0.1s, box-shadow 0.1s;
}
/* Highlight for drop target square */
.highlight-drop {
    box-shadow: 0 0 0 4px #ffe066 inset, 0 0 10px 2px #ffe066;
    background: #ffe066 !important;
    transition: background 0.1s, box-shadow 0.1s;
}
.main-flex-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.title-area {
    width: 100%;
    text-align: center;
    font-family: monospace;
    font-size: 24px;
    font-weight: bold;
}
#titlePanel {
    width: auto;
    font-size: 24px;
}
#sharedPanel {
    width: 200px;
    text-align: center;
    font-size: 16px;
    margin: auto;
}
#sharedLinkPanel {
    width: 200px;
    text-align: center;
    font-size: 14px;
    margin: auto;
}
.board-area {
    position: relative;
    width: 560px;
    height: 560px;
}
.analysis-area {
    position: relative;
    flex-direction: column;
    width: 240px;
    height: 160px;
    display: flex;
    justify-content: left;
    text-align: left;
    margin-top: 16px;
}
.polyglot-area {
    position: relative;
    flex-direction: column;
    width: 240px;
    height: 400px;
    display: flex;
    justify-content: left;
    text-align: left;
    margin-top: 16px;
}
.tree-area {
    width: 640px;
    height: 550px;
    background: #fafaff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.move-suggestions-area {
    width: 260px;
    height: 550px;
    background: #fafaff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#analysisPanel {
    margin: 0px auto 0px auto;
    width: 220px;
    height: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 6px;
    text-align: left;
    font-family: monospace;
    font-size: 16px;
    display: none;
    margin-top: 6px;
}
#polyglotPanel {
    margin: 0px auto 0px auto;
    width: 220px;
    height: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 6px;
    text-align: left;
    font-family: monospace;
    font-size: 16px;
    display: none;
    margin-top: 8px;
}
/* Analysis tickbox container styling */
.analysis-depth-container {
    margin: 0 0 0 0;
    text-align: left;
}
/* PGN textarea styling moved from inline CSS in index.php */
.pgn-textarea {
    display: none;
    width: 620px;
    height: 200px;
    margin: 0 auto 12px auto;
}
.pgn-textarea.show {
    display: block;
}
/* Tree controls styling moved from inline CSS in index.php */
.tree-controls {
    text-align: center;
    margin-bottom: 12px;
}
#chessboard {
    position: absolute;
    left: 52px;
    top: 32px;
    width: 478px;
    height: 480px;
    touch-action: none;
}
#board-bottom-labels {
    position: absolute;
    left: 52px;
    top: 512px;
    width: 480px;
    height: 32px;
    display: flex;
    pointer-events: none;
}
.board-label-bottom {
    flex: 1;
    text-align: center;
    line-height: 32px;
    font-size: 18px;
}
#board-right-labels {
    position: absolute;
    left: 532px;
    top: 32px;
    width: 40px;
    height: 480px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.board-label-right {
    height: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 18px;
}
/* Board coordinate labels */
#board-top-labels {
    position: absolute;
    left: 52px;
    top: 0;
    width: 480px;
    height: 32px;
    display: flex;
    pointer-events: none;
}
.board-label-top {
    flex: 1;
    text-align: center;
    line-height: 32px;
    font-size: 18px;
}
#board-left-labels {
    position: absolute;
    left: 0;
    top: 32px;
    width: 52px;
    height: 480px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.board-label-left {
    height: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 18px;
}
/* style.css - Chess board and move tree styles */
.tree-container {
    font-family: 'Consolas', 'Menlo', 'monospace';
    font-size: 16px;
    background: #fafaff;
    border-radius: 8px;
    padding: 10px;    
    width: auto;
    text-wrap: nowrap;
    display: inline-block;
}
.tree-node {
    display: flex;
    align-items: center;
    padding: 2px 0 2px 0;
    transition: background 0.2s;
}
.tree-node.current-node {
    background: #d0e0ff;
    display: inline-flex;
}
.tree-icon {
    color: #bbb;
    width: 24px;
    min-width: 24px;
    font-size: 14px;
    text-align: left;
    transform: scaleY(2)
}
.tree-go {
    background: #4287f5;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 6px;
    cursor: pointer;
    font-size: 14px;
}
.tree-go:hover {
    background: #2a5db0;
}
.tree-go-start {
    background: #4287f5;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 6px;
    cursor: pointer;
    font-size: 14px;
}
.tree-go-start:hover {
    background: #2a5db0;
}
.tree-go-multiple {
    background: #e50f0fff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 6px;
    cursor: pointer;
    font-size: 14px;
}
.tree-go-multiple:hover {
    background: #2a5db0;
}
.tree-move {
    font-weight: 500;
    color: #222;
    margin-left: 2px;
}
.analysis-move-btn, .polyglot-move-btn {
    background: #f0f0f0;
    color: #4287f5;
    border: none;
    border-radius: 4px;
    padding: 2px 0px;
    margin-right: 0px;
    cursor: pointer;
    font-size: 18px;
}
body {
    font-family: 'Consolas', 'Menlo', 'monospace';
    background: #f0f0f0;
    margin: 0px;
}
#chessboard {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 0;
    box-sizing: border-box;
    touch-action: none;
}
.board-border-top {
    position: absolute;
    left: 52px;
    top: 32px;
    width: 480px;
    height: 0;
    border-bottom: 2px solid #333;
    pointer-events: none;
    z-index: 2;
}
.board-border-left {
    position: absolute;
    left: 52px;
    top: 32px;
    width: 0;
    height: 480px;
    border-left: 2px solid #333;
    pointer-events: none;
    z-index: 2;
}
.board-border-bottom {
    position: absolute;
    left: 52px;
    top: 512px;
    width: 480px;
    height: 0;
    border-bottom: 2px solid #333;
    pointer-events: none;
    z-index: 2;
}
.board-border-right {
    position: absolute;
    left: 530px;
    top: 32px;
    width: 0;
    height: 480px;
    border-right: 2px solid #333;
    pointer-events: none;
    z-index: 2;
}
.square {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    user-select: none;
}
.light {
    background: #f0d9b5;
}
.dark {
    background: #b58863;
}
.piece {
    cursor: grab;
}
.piece.dragging {
    opacity: 0.5;
}
.piece img {
    width: 48px;
    height: 48px;
    pointer-events: none;
    display: block;
}
.tree-panel {
    width: 600px;
    margin: 10px auto;
    background: #fafaff;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    border-radius: 8px;
    height: 360px;
    overflow: auto;
}

.tree-title-panel {
    width: 600px;
    margin: 10px auto;
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;    
}
.chesspieceCharacter {
  font-size: 130%;
  line-height: 0;
  font-weight:normal !important;
}

@media (pointer: coarse), (max-width: 600px) {
    .tree-control-buttons, .tree-go-back, .tree-go-forward, .tree-go-prev-branch, .tree-go-next-branch {
        font-size: 22px !important;
        padding: 12px 24px !important;
        min-width: 56px;
        min-height: 48px;
        border-radius: 8px;
    }

    .tree-go, .tree-go-start, .tree-go-multiple {
        font-size: 18px !important;
        padding: 4px 8px !important;
        border-radius: 6px;
    }

    .analysis-move-btn, .polyglot-move-btn {
        font-size: 18px !important;
        padding: 4px 8px !important;
        border-radius: 6px;
        margin: 0 8px 0 0;
    }

    input[type="text"], textarea, .comment-input {
        font-size: 22px !important;
        padding: 12px 16px !important;
        min-height: 48px;
        border-radius: 8px;
        width: 100% !important;
        box-sizing: border-box;
    }
    #analysisPanel {
        height: 100px !important;
    }
}
