* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #dcecfb; /* Light blue background */
    color: #2d3748;
    line-height: 1.6;
}

/* Navbar */
header {
    background: white;
    border-bottom: 1px solid #cbd5e0;
    padding: 1rem 5%;
}

.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.nav-links li {
    flex: 0 0 auto;
    width: 140px; /* consistent width for equal spacing */
    text-align: center;
}

.nav-links a {
    display: inline-block;
    width: 100%;
    padding: 0.5rem 0;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
}

.nav-links a.active {
    color: #000;
    font-weight: 700;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login {
    background: #e2e8f0;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    color: #fff; /* Matches the white text in the image */
}

.btn-signup {
    background: #f6ad55; /* Orange color */
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #4a5568;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    min-width: 180px;
}

.btn-secondary {
    background-color: transparent;
    color: #3182ce;
    border: 2px solid #3182ce;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    min-width: 180px;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: left;
}

.card h3 {
    color: #2c5282;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card p {
    color: #4a5568;
}

/* ... [Keep previous styles from Home Page] ... */

.dashboard-body {
    background-color: #dcecfb;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Left column narrower than right */
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.dash-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Base Card Styles */
.card-action, .card-info, .card-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #718096;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1); /* Subtle "blocky" shadow from image */
}

/* Start New Case Card */
.blue-card {
    background-color: #3182ce;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: transform 0.1s;
    border: none;
    box-shadow: 0px 6px 0px #2a4365; /* Darker blue shadow from image */
}

.blue-card:active {
    transform: translateY(4px);
    box-shadow: 0px 2px 0px #2a4365;
}

.blue-card hr {
    width: 80%;
    margin: 1rem auto;
    border: 0.5px solid rgba(255,255,255,0.3);
}

/* Progress and Container Cards */
.progress-card, .card-container {
    background-color: #edf2f7; /* Light grey-blue background */
    text-align: center;
}

.progress-card h3, .card-container h3 {
    color: #2c5282;
    font-size: 1.5rem;
}

.thin-hr {
    border: none;
    border-top: 1px solid #cbd5e0;
    margin: 1rem 0;
}

.stat-group {
    margin-top: 1rem;
}

.stat-label {
    color: #4a5568;
    font-size: 0.9rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c5282;
    margin-bottom: 0.5rem;
}

.empty-state {
    padding: 2rem;
    color: #a0aec0;
    font-style: italic;
}

/* Highlight for search matches */
.search-highlight {
    background: #fff59d; /* pale yellow */
    padding: 0 4px;
    border-radius: 4px;
}

/* Typing indicator: make dots larger and more visible */
.typing-indicator {
    /* Smaller bubble for typing indicator to match normal patient messages */
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    max-width: 120px;
}

.typing-indicator p {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 6px;
    margin: 0;
    color: white; /* white dots */
    text-align: center;
}

.btn-logout {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

/* Cases Page Specifics */
.cases-page-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.cases-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.cases-title h1 {
    color: #2c5282;
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.cases-title p {
    color: #4a5568;
}

/* Search Bar */
.search-container {
    display: flex;
    gap: 1rem;
}

.search-input {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    width: 300px;
}

.btn-search {
    background-color: #cbd5e0;
    color: #718096;
    border: 1px solid #718096;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 3px 3px 0px #718096;
}

/* Case List Container */
.cases-list-outer {
    background-color: #edf2f7;
    border: 1px solid #718096;
    border-radius: 12px;
    padding: 2rem;
}

.case-count {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.case-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Case Card */
.case-card {
    background: white;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #cbd5e0;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.08);
    margin-bottom: 0.6rem;
    min-height: 60px;
    font-size: 0.95rem;
}

.case-info h3 {
    color: #2c5282;
    margin-bottom: 0.15rem;
    font-size: 1.05rem;
}

/* Ensure the case info (title, summary, tags) are left-aligned and take available space */
.case-card .case-info {
    text-align: left;
    flex: 1 1 auto;
}

.case-info p {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Case tags: display as small coloured boxes with commas between them */
.case-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
}
.case-tag {
    display: inline-block;
    background: #e6f2ff; /* light blue */
    color: #1a202c;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(49,130,206,0.12);
    line-height: 1;
    white-space: nowrap;
}
.case-tags > span + span { /* ensure minimal spacing when commas are present */
    margin-left: 0;
}

/* Right-aligned column for action buttons and small notes */
.session-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* Small note shown for finished sessions when feedback isn't generated */
.session-note {
    margin-top: 6px;
    font-size: 0.8rem;
    font-style: normal;
    text-align: right;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff3cd; /* subtle warning/yellow */
    color: #856404; /* dark warning text */
    border: 1px solid rgba(133,100,4,0.12);
    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

/* Attempts banner at top of dashboard */
.attempts-banner {
    max-width: 1200px;
    margin: 0.6rem auto; /* keep vertical spacing */
    padding: 0; /* remove internal white box spacing */
    background: transparent; /* remove white background */
    border: none;
    border-radius: 0;
    color: #2c5282;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.attempts-inner { display:flex; gap:12px; align-items:center; justify-content:center; }

/* Generic bubble */
.bubble {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Tier bubble default (non-free) */
.tier-bubble {
    background: #e6f2ff;
    color: #1a202c;
    border: 1px solid rgba(49,130,206,0.12);
}

/* Tier bubble when FREE */
.tier-bubble.free {
    background: #edf2f7; /* light grey */
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

/* Attempts bubble */
.attempts-bubble {
    background: #e6fffa; /* pale green */
    color: #056162;
    border: 1px solid rgba(6,97,98,0.08);
}

/* Low attempts indicator */
.attempts-bubble.low {
    background: #fff5f5; /* pale red */
    color: #742a2a;
    border: 1px solid rgba(245,101,101,0.12);
}

.btn-primary-small {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 0.7rem 2.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

/* Session Layout */
.session-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    height: 80vh;
}

.session-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card, .notes-card, .chat-wrapper {
    background: white;
    border: 1px solid #718096;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.card-title {
    color: #2c5282;
    text-align: center;
    margin-bottom: 0.5rem;
}

.notes-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.notes-card textarea {
    flex-grow: 1;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 1rem;
    resize: none;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #718096;
}

/* Chat Interface Styles */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0; /* Remove padding to let header/input stretch */
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #cbd5e0;
}

.btn-pause { background: #fbd38d; border: 1px solid #dd6b20; border-radius: 8px; padding: 0.5rem 1.5rem; cursor: pointer; }
.btn-giveup { background: #feb2b2; border: 1px solid #f56565; border-radius: 8px; padding: 0.5rem 1.5rem; cursor: pointer; }
.btn-retry { background: #feb2b2; border: 1px solid #f56565; border-radius: 8px; padding: 0.5rem 1.5rem; cursor: pointer; }

.btn-generate-feedback {
    background: #38b2ac; /* Bluish green tone */
    border: 1px solid #2c7a7b;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-generate-feedback:hover {
    background: #2c7a7b;
}

.chat-window {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #f7fafc;
}

/* Bubbles */
.message { max-width: 80%; padding: 1rem; border-radius: 8px; position: relative; }

.patient-msg {
    align-self: flex-start;
    background-color: #3182ce;
    color: white;
    box-shadow: 4px 4px 0px rgba(49, 130, 206, 0.2);
}

.user-msg-wrapper {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.user-msg {
    background-color: white;
    border: 1px solid #cbd5e0;
    color: #2d3748;
}

.btn-eval {
    background: #cbd5e0;
    border: none;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #718096;
}

/* Input Area */
.chat-input-area {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    background: white;
    border-top: 1px solid #cbd5e0;
}

.chat-input-area input {
    flex-grow: 1;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background: #f7fafc;
}

.btn-send {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 4px 4px 0px #2a4365;
}

/* Chat Bubble Tails */
.patient-msg, .user-msg {
    position: relative;
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.1));
}

/* Patient tail (Left) */
.patient-msg::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid #3182ce;
}

/* User tail (Right) */
.user-msg::before {
    content: "";
    position: absolute;
    right: -10px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #ffffff;
}

/* Modal Styling */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 500px;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    border: 1px solid #718096;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
}

.btn-exit {
    position: absolute;
    right: 20px;
    top: 20px;
    background: #cbd5e0;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

/* Style for logout confirmation modal's Cancel button to match header logout button */
#logoutConfirmModal .btn,
#logoutConfirmModal .btn-primary {
    /* Match header logout button sizing and shape */
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    min-width: 140px;
    cursor: pointer;
    font-weight: bold;
}

#logoutConfirmModal .btn {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    color: white;
}

#logoutConfirmModal .btn-primary {
    /* keep primary blue but match sizing */
    background-color: #3182ce;
    color: white;
    border: none;
}

/* Match styling for Give Up confirmation modal buttons to the logout modal */
#giveUpConfirmModal .btn,
#giveUpConfirmModal .btn-primary {
    /* Match header logout button sizing and shape */
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    min-width: 140px;
    cursor: pointer;
    font-weight: bold;
}

#giveUpConfirmModal .btn {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    color: white;
}

#giveUpConfirmModal .btn-primary {
    /* Match the page give-up button color and border */
    background-color: #feb2b2;
    border: 1px solid #f56565;
    color: #2d3748;
}

/* Pause confirmation modal should match Give Up modal styling */
#pauseConfirmModal .btn,
#pauseConfirmModal .btn-primary {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    min-width: 140px;
    cursor: pointer;
    font-weight: bold;
}

#pauseConfirmModal .btn {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    color: white;
}

#pauseConfirmModal .btn-primary {
    /* match the on-page pause button (yellowish) */
    background-color: #fbd38d;
    border: 1px solid #dd6b20;
    color: #2d3748;
}

/* Retry confirmation modal should match Give Up modal but use retry color */
#retryConfirmModal .btn,
#retryConfirmModal .btn-primary {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    min-width: 140px;
    cursor: pointer;
    font-weight: bold;
}

#retryConfirmModal .btn {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    color: white;
}

#retryConfirmModal .btn-primary {
    /* match the .btn-retry color */
    background-color: #feb2b2;
    border: 1px solid #f56565;
    color: #2d3748;
}

.eval-q-text {
    text-align: center;
    font-weight: 500;
    margin-top: 20px;
    color: #2d3748;
}

.eval-label {
    text-align: center;
    color: #4a5568;
    margin: 1rem 0;
}

.eval-box {
    background: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c5282;
}

/* User Message Wrapper to stack Bubble + Button */
.user-msg-wrapper {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 15px;
}

/* The Button itself */
.btn-eval {
    background: #cbd5e0;
    border: none;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #718096;
    color: #4a5568;
    font-weight: bold;
    transition: transform 0.1s;
}

.btn-eval:active {
    transform: translateY(2px);
    box-shadow: 1px 1px 0px #718096;
}

/* Bubble Tails (WhatsApp Style) */
.patient-msg, .user-msg {
    position: relative;
    padding: 12px 16px;
    border-radius: 10px;
}

.patient-msg::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid #3182ce;
}

.user-msg::before {
    content: "";
    position: absolute;
    right: -10px;
    top: 10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #ffffff;
}

/* Auth Input Styling */
.auth-input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #f7fafc;
}

.auth-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

/* Reduce vertical gap specifically for signup form inputs so helper text sits closer */
#signupForm .auth-input {
    margin-bottom: 6px;
}

/* Make the username helper sit tightly under the username input,
   but add spacing after the helper before the email field */
#signupUsername {
    margin-bottom: 0; /* remove gap below username input */
}
#usernameError {
    margin: 0 0 4px 0;
}
#usernameHelp {
    margin: 0 0 12px 0; /* small gap before the email input */
    display: block;
}

/* Disabled button styling */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cbd5e0 !important;
    color: #718096 !important;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 300px; /* Ensure enough space for both options */
    height: 50px;
    background-color: #dcecfb;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.toggle-label {
    font-size: 16px;
    padding: 10px 15px;
    white-space: nowrap;
    z-index: 2;
    position: relative;
    cursor: pointer; /* Ensure the cursor changes to a pointer when hovering over the button */
}

.toggle-slider {
    position: absolute;
    width: 140px; /* Adjusted to fully cover the selected mode */
    height: 40px;
    top: 5px;
    left: 5px;
    background-color: white;
    border-radius: 20px;
    transition: transform 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#viewChat:checked ~ .toggle-slider {
    transform: translateX(0);
}

#viewFeedback:checked ~ .toggle-slider {
    transform: translateX(150px); /* Adjusted to align with the right side */
}

#viewChat:checked + .toggle-label {
    color: #2563eb;
}

#viewFeedback:checked + .toggle-label {
    color: #2563eb;
}

.toggle-input {
    display: none; /* Hide the small radio buttons */
}

#viewChat:checked + .toggle-label,
#viewFeedback:checked + .toggle-label {
    font-weight: bold; /* Add bold styling to the selected option */
}

/* Leaderboard Specifics */
.leaderboard-page-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 1rem;
}

.leaderboard-header h1 {
    color: #2c5282;
    font-size: 2.5rem;
}

.leaderboard-header p {
    color: #718096;
    font-size: 1.1rem;
}

.leaderboard-list-outer {
    background-color: #edf2f7;
    border: 1px solid #718096;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Zebra striping for leaderboard table rows */
.leaderboard-card table tbody tr:nth-child(odd) td {
    background: #ffffff;
}
.leaderboard-card table tbody tr:nth-child(even) td {
    background: #edf2f7; /* Match .leaderboard-list-outer background */
}

.leaderboard-card table tbody tr td {
    border-top: 1px solid rgba(0,0,0,0.04);
}

/* Ensure consistent row heights and alignment for leaderboard table */
.leaderboard-card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto; /* allow columns to size to content so University can expand */
}

.leaderboard-card table thead th {
    padding: 14px 18px;
}

.leaderboard-card table tbody tr td {
    padding: 14px 18px;
    height: 56px; /* consistent row height */
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Allow the University column (3rd column) to wrap so full names are visible */
.leaderboard-card table thead th:nth-child(3),
.leaderboard-card table tbody td:nth-child(3) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    min-width: 420px; /* prefer wider column for full names */
    max-width: none;
}

/* Give the columns explicit hints so the layout stays balanced */
.leaderboard-card table thead th:nth-child(1),
.leaderboard-card table tbody td:nth-child(1) {
    width: 64px;
}
.leaderboard-card table thead th:nth-child(2),
.leaderboard-card table tbody td:nth-child(2) {
    width: 220px;
}

/* Leaderboard Row Item */
.leaderboard-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e0;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.05);
}

.leaderboard-item .rank {
    font-size: 1.2rem;
    font-weight: bold;
    width: 40px;
    color: #4a5568;
}

.leaderboard-item .avatar {
    width: 45px;
    height: 45px;
    background-color: #cbd5e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-right: 1.5rem;
}

.leaderboard-item .user-info {
    flex-grow: 1;
}

.leaderboard-item .user-info h3 {
    font-size: 1.1rem;
    color: #2d3748;
}

.leaderboard-item .score {
    font-weight: bold;
    color: #3182ce;
    font-size: 1.1rem;
}

/* Top 3 Medals Style */
.rank-1 .avatar { background-color: #ecc94b; } /* Gold */
.rank-2 .avatar { background-color: #a0aec0; } /* Silver */
.rank-3 .avatar { background-color: #ed8936; } /* Bronze */

.rank-1 { border: 2px solid #ecc94b; }

/* Current User Highlight */
.your-rank-container {
    margin-top: 1rem;
}

/* current-user keeps no background, shadow, or color overrides; only bold text remains */


/* Make the logged-in user's row text bold and slightly emphasized */
.leaderboard-card table tbody tr.current-user td {
    font-weight: 700;
}