body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ef 100%);
    color: #222;
}

header {
    background: linear-gradient(90deg, #35424a 60%, #4e5d6c 100%);
    color: #fff;
    padding: 24px 0 12px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

h1 {
    margin: 0;
    font-size: 3em;
    letter-spacing: 4px;
}

h3 {
    margin-top: 8px;
    margin-left: 10px;
    font-weight: 700;
}

p {
    margin-left: 10px;
}

nav {
    margin: 20px 0;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
}

nav a:hover {
    background: #e8491d;
}

footer {
    background: linear-gradient(90deg, #35424a 60%, #4e5d6c 100%);
    color: #fff;
    text-align: center;
    padding: 16px 0;
    font-size: 1em;
    letter-spacing: 1px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.footer-fixed {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 999;
}

/* Home Page Styling */
#home {
    background: linear-gradient(90deg, #35424a 60%, #4e5d6c 100%);
    color: #fff;
    min-height: calc(100vh - 120px); /* Account for header and footer */
    padding: 20px;
}

/* Hide the main header title only when on home page */
body.home-active header h1 {
    display: none;
}

/* Move tabs to very top on home page */
body.home-active header {
    padding: 0;
}

body.home-active .tabs {
    margin: 0;
}

.home-title {
    text-align: center;
    margin: 10px 0 20px 0;
    padding: 15px;
}

.home-title h1 {
    font-size: 3em;
    margin: 0;
    background: linear-gradient(45deg, #fff, #f0f0f0, #e8e8e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    letter-spacing: 2px;
    color:#4e5d6c;
}

#home h2:first-of-type {
    font-size: 2em;
    text-align: center;
    margin: 20px 0 30px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.01);
    background: linear-gradient(45deg, #fff, #e8e8e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#home h3 {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

#home p {
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/*Where they write their name*/
.user-input-box {
    margin: 24px 0 16px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    
}

.user-input-box input {
    padding: 10px 16px;
    font-size: 1.1em;
    border-radius: 6px;
    border: 1px solid #bcd0e5;
    outline: none;
    transition: border 0.2s;
}

.user-input-box input:focus {
    border: 1.5px solid #4e5d6c;
}

.user-input-box button {
    padding: 10px 24px;
    font-size: 1.1em;
    border-radius: 6px;
    border: none;
    background: #4e5d6c;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.user-input-box button:hover {
    background: #2d3741;
}

#user-counter {
    font-size: 1.3em;
    font-weight: 500;
    margin: 18px 0 24px 0;
    color: #2d3741;
    text-align: center;
    background: #e3eaf4;
    border-radius: 8px;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* the white background behind the whole thing?*/
.leaderboard-box {
    margin: 32px 0;
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#leaderboard-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e3eaf4;
    font-size: 1.1em;
}
#leaderboard-list li:last-child {
    border-bottom: none;
}

/* Leaderboard header with refresh button */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.leaderboard-header h2 {
    margin: 0;
    flex: 1;
}

.refresh-btn {
    background: #4e5d6c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-btn:hover {
    background: #35424a;
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(360deg);
}

/* The Tabs they kinda explain themselves*/
.tabs {
    display: flex;
    gap: 0;
    margin: 24px 0 0 0;
    justify-content: stretch;
    width: 100%;
}

.tab-btn {
    flex: 1;
    padding: 12px 28px;
    border: none;
    background: #e3eaf4;
    cursor: pointer;
    border-radius: 8px 8px 8px 8px;
    font-size: 1.1em;
    color: #35424a;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    text-align: center;
    border-right: 1px solid #ccc;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn.active, .tab-btn:hover {
    background: #d0eaff;
    color: #222;
}

.tab-content {
    display: none;
    padding: 32px 0 0 0;
}

.tab-content.active {
    display: block;
}

@media (max-width: 700px) {
    .container {
        padding: 18px 4vw;
    }
    .tabs {
        flex-direction: row;
        width: 100%;
    }
    .tab-btn {
        flex: 1;
        font-size: 1em;
        padding: 10px 12px;
        border-radius: 6px 6px 6px 6px;
    }
}

/*These were in my HTML file*/
#counter {
    font-size: 2em;
    margin: 20px;
}
button {
    margin: 5px;
}

/* Saved Overlay styles */
#saved-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#saved-overlay .overlay-content {
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
}

#missions-list {
    margin-bottom: 48px;
    width: 95vw;           /* Use most of the viewport width */
    max-width: none;       /* Remove previous max-width */
    margin-left: auto;
    margin-right: auto;
}

.mission-category {
    margin-top: 32px;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 700;
    color: #35424a;
    border-bottom: 2px solid #bcd0e5;
    padding-bottom: 4px;
}
.mission-category:first-child {
    margin-top: 0;
}

.mission-category-dropdown {
    margin-bottom: 18px;
    border-radius: 8px;
    background: #f4f8fb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.mission-category.dropdown-toggle {
    cursor: pointer;
    -webkit-user-select: none; /* Safari, Chrome, older iOS/Android */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ and Edge */
    user-select: none;         /* Modern browsers */
    margin: 0;
    padding: 14px 16px;
    font-size: 1.15em;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #bcd0e5;
    background: #e3eaf4;
    border-radius: 8px 8px 0 0;
    transition: background 0.2s;
}

.mission-category.dropdown-toggle:hover {
    background: #d0eaff;
}

.mission-category .arrow {
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s;
}

.mission-category-dropdown.open .arrow {
    transform: rotate(90deg);
}

.dropdown-content {
    display: none;
    padding: 12px 16px 12px 32px;
}

.mission-category-dropdown.open .dropdown-content {
    display: block;
}

/* Mission item styling */
.mission {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e0e7ef;
    gap: 8px;
    position: relative;
    flex-wrap: wrap;
}

.mission .count-value {
    font-weight: 600;
    margin-right: 10px;
    min-width: 20px;
}

.mission .mission-name {
    flex: 1;
    margin-right: 8px;
}

.mission .mission-points {
    margin-right: 8px;
    color: #666;
    font-size: 0.9em;
}

.mission .info-btn {
    margin-left: auto !important;
}

.mission .description {
    position: absolute;
    left: calc(30px + 10px); /* Position after count-value width + margin */
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 4px;
    max-width: 300px;
    font-size: 0.9em;
    color: #333;
}