html {
    font-size: 14px;
}

h1 {
    font-size: x-large;
}

h2 {
    font-size: larger;
    /* font-weight: bold;*/
}

h3 {
    font-size: large;
}

h4 {
    font-size: medium;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

body.chat-layout {
    margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}





/*------------------------------------------*/
.player-profile {
    max-width: 900px;
    margin: auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.profile-content {
    font-family: Arial, sans-serif;
    margin: 0 auto;
    max-width: 900px;
}

@media (max-width: 600px) {
    .profile-content {
        max-width: 100%;
    }
}

.header {
    display: flex;
    align-items: center;
    background: #f3f3f3;
    padding: 15px;
    border-radius: 8px;
    gap: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #ddd;
}

.player-info {
    flex-grow: 1;
}

    .player-info h1 {
        font-size: 24px;
        margin: 0 0 10px;
    }

    .player-info p {
        margin: 5px 0;
        font-size: 16px;
    }

.bio, .stats {
    margin-top: 10px;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

    .stats ul {
        list-style: none;
        padding: 0;
    }

    .stats li {
        padding: 5px 0;
    }

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }
}


.profile-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

    .profile-nav a {
        text-decoration: none;
        padding: 0.7rem 1.2rem;
        background-color: var(--primary-color, #0b9942);
        border-radius: 8px;
        font-weight: 500;
        color: #fff;
        transition: background-color 0.3s ease, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    }

        .profile-nav a:hover {
            background-color: var(--primary-color-dark, #078a3c);
            transform: translateY(-3px);
            box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
        }



/* Bio and Coach sections */
#bio, #coach {
    margin: 0rem 0;
    padding: 0.71rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
}

    #bio h2, #coach h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.25rem;
    }

.chart-container svg {
    width: 100%;
    height: auto;
    min-width: 220px;
}

/* Simple chessboard using Unicode pieces */
.simple-chessboard {
    position: relative;
    display: grid;
    grid-template-columns: 20px repeat(8, 40px);
    grid-template-rows: repeat(8, 40px) 20px;
    border: 1px solid #333;
    width: 340px;
}

    .simple-chessboard .square {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
    }

    .simple-chessboard .coord {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        user-select: none;
    }

    .simple-chessboard .light {
        background-color: var(--board-light-color);
    }

    .simple-chessboard .dark {
        background-color: var(--board-dark-color);
    }

    .simple-chessboard .highlight {
        background-color: var(--board-highlight-color);
    }

.arrow-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chess-viewer {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

    .chess-viewer .move-panel {
        max-height: 340px;
        overflow-y: auto;
    }

    .chess-viewer .move-list {
        list-style: decimal;
        padding-left: 1.2rem;
    }

    .chess-viewer .move-list button {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    .chess-viewer .move-list button.current {
        font-weight: bold;
    }

    .chess-viewer .viewer-controls {
        margin-top: 0.5rem;
        display: flex;
        gap: 0.5rem;
    }

.arrow-overlay .arrow-line {
    stroke: var(--arrow-color);
    stroke-width: 4;
}

.arrow-overlay .arrow-head {
    fill: var(--arrow-color);
}


.chat-window {
    height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    border: 1px solid #ccc;
}

.chat-bubble {
    margin-bottom: .5rem;
    max-width: 80%;
    padding: .5rem;
    border-radius: .5rem;
}

    .chat-bubble.user {
        background-color: #d1e7dd;
        margin-left: auto;
    }

    .chat-bubble.assistant {
        background-color: #e7f1ff;
        margin-right: auto;
    }

    .chat-bubble.with-avatar {
        display: flex;
        align-items: flex-start;
    }

        .chat-bubble.with-avatar .avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: .5rem;
        }

        .chat-bubble.with-avatar.user {
            flex-direction: row-reverse;
        }

            .chat-bubble.with-avatar.user .avatar {
                margin-right: 0;
                margin-left: .5rem;
            }

        .chat-bubble.with-avatar .content-wrapper {
            max-width: 100%;
        }

    .chat-bubble .timestamp {
        font-size: .75rem;
        color: #666;
        display: flex;
        justify-content: space-between;
    }

    .chat-bubble .status {
        margin-left: .5rem;
    }

    .chat-bubble .content {
        overflow-wrap: anywhere;
    }

.chat-header {
    display: flex;
    align-items: center;
    padding: .5rem;
    border-bottom: 1px solid #ccc;
}

.chat-header .coach-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: .5rem;
}

.chat-header .coach-name {
    font-weight: bold;
    margin-right: auto;
}

.chat-header .new-session {
    font-size: .9rem;
}

.loading {
    margin-top: .5rem;
}

.typing-indicator {
    font-style: italic;
    color: #666;
    margin-top: .5rem;
    margin-right: auto;
    max-width: 80%;
}

.options-container {
    margin-bottom: .5rem;
}

#chatForm textarea,
#chatForm #sendBtn {
    height: 3.125rem;
}

.online-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background-color: #198754;
    border-radius: 50%;
}
