/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
}

h1, h2 {
    color: #333;
}

ul {
    list-style: none;
    padding: 0;
}

/* Generic container (used on many pages) */
.container {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: #6c757d;
    color: white;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Voting controls */
.vote-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 10px;
    margin-left: 2px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.vote-btn.downvote {
    background: #dc3545;
}

.vote-btn:hover {
    opacity: 0.8;
}

/* Voting dropdown + button block */
.vote-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.grade-dropdown {
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    background: #007bff;
    color: white;
    border: none;
}

.btn-small:hover {
    background: #0056b3;
}

/* Climb List (used on boulder + logbook pages) */
.climb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.climb-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    display: flex;                  /* info left, grade/vote right */
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.climb-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.climb-info {
    flex: 1;
    color: #444;
}

.climb-info b {
    font-size: 1.2rem;
    color: #222;
}

/* Grade badge (for logbook and climb lists) */
.grade-badge {
    background: #007bff;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: 1rem;
    white-space: nowrap;
}

/* Images */
img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: #f5f5f5;
}

.auth-box {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #333;
}

.auth-box input[type="text"],
.auth-box input[type="email"],
.auth-box input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.2s;
}

.auth-box input:focus {
    border-color: #007bff;
    outline: none;
}

.auth-box button {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-box button:hover {
    background: #0056b3;
}

.auth-box a {
    display: inline-block;
    margin-top: 1rem;
    color: #007bff;
    text-decoration: none;
}

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

/* Logbook Container */
.logbook-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.logbook-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}
/* Navigation bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: #007bff;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.nav-brand:hover {
    text-decoration: underline;
}

.nav-user {
    margin-right: 1rem;
    color: #f1f1f1;
    font-size: 0.95rem;
}

.nav-right a {
    margin-left: 0.5rem;
}
/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: opacity 0.2s;
    font-size: 1rem;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-user {
    margin-right: 0.8rem;
    font-size: 0.95rem;
    font-style: italic;
    color: #f0f0f0;
}
.flash-container {
    position: fixed;
    top: 80px;       /* distance from top */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.flash {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    color: white;
}
.flash-success { background-color: #28a745; }
.flash-danger { background-color: #dc3545; }
.flash-info { background-color: #17a2b8; }
.leaderboard {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.leaderboard th, .leaderboard td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.leaderboard th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.highlight {
    background-color: #e3ffe3;
    font-weight: bold;
}
.info.legend {
    padding: 6px 8px;
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    font-size: 14px;
    line-height: 18px;
    color: #333;
    pointer-events: auto;  /* allows interaction */
}
