* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif, sans;
    font-size: 1.5vw;
}

body {
    background: #0e1123;
    margin: 0px;
    color: #cccccc;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow-y: scroll;
}

.flex-grow-spacer {
    flex-grow: 1;
}

a { color: inherit; text-decoration: none; }

/*
a:link { color: #ccc; }
a:active { color: #ccc; }
a:visited { color: #ccc; }
a:hover { color: #ccc; }
*/

a.link {
    color: #6ee;
    text-decoration: underline;
}

form {
    margin: 0;
    padding: 0;
}

.content {
    padding: 0.5rem;
}

.topnav {
    min-width: 500px;
    min-height: 2.4rem;
    border-bottom: 0.05rem solid white;
    overflow: auto hidden;
}

.topnav .logo {
    float: left;
    padding: 0;
    margin: 0;
}

.topnav .logo img {
    height: 4rem;
    width: 10rem;
    max-width: 10rem;
    object-fit: cover;
    object-position: center;
    display: block;
}

.topnav .nav {
    float: left;
    padding: 0.3rem;
    background: #000000;
    border-radius: 0.5rem;
    border: 0.1rem solid #066;
    margin: 0.3rem 0.2rem 0 0.2rem;
    position: relative;
}

.topnav .nav.sel {
    border-color: #0ff;
}

.topnav .nav a {
    color: #6cc;
}

.topnav .nav .indicator {
    position: absolute;
    right: -0.5rem;
    top: -0.5rem;
    font-size: 0.8rem;
}

.topnav .nav:hover {
    background-color: #099;
    border-color: #6cc;
}

.topnav .nav:hover a {
    color: black;
}

.topnav .nav.help-video {
    background: #066;
    text-align: center;
    border-color: #066;
    padding: 0.2rem 0.2rem 0.15rem;
    font-size: 0.6rem;
    color: #eee;
}

.topnav .nav.help-video:hover {
    background-color: black;
    border-color: #099;
}

.beta-tag {
    font-size: 0.6rem;
    color: #ff6b35;
    font-weight: bold;
    margin-left: 0.2rem;
    vertical-align: baseline;
    display: inline-block;
    line-height: 1;
}

.topnav .subnav-group {
    clear: right;
    float: left;
    display: none;
}

.topnav .subnav-group .sub-nav {
    float: left;
    padding: 0.1rem 0.3rem;
    font-size: 1.0rem;
    background: #066;
    color: #eee;
    border: 0.1rem solid black;
    border-radius: 0.4rem;
    margin: 0.1rem 0.2rem 0 0.2rem;
}

.topnav .subnav-group .sub-nav:hover {
    background-color: #ccc;
    color: #066;
    border-color: #066;
}

.topnav .id-nav {
    clear: right;
    float: right;
    padding: 0.3rem 0.5rem;
}

.topnav .id-nav .member-no {
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    background-color: #0cb4db;
    /*
    background-color: #dbb40c;
    */
    color: black;
    border: 0.05rem solid #0ff;
    position: relative;
    top: -0.1rem;
    margin-left: 0.2rem;
}

.topnav .id-nav .ultimate-indicator {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #000;
    border: 0.05rem solid #ff8c00;
    margin-left: 0.3rem;
    position: relative;
    top: -0.1rem;
    box-shadow: 0 0.05rem 0.1rem rgba(0,0,0,0.3);
    text-shadow: 0 0.02rem 0.02rem rgba(255,255,255,0.5);
}

.topnav .id-nav .account-books {
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    background-color: #099;
    color: #eee;
    border: 0.05rem solid #aaa;
    position: relative;
    top: -0.1rem;
    margin-left: 0.2rem;
    cursor: pointer;
}

.topnav .id-nav .account-weightings {
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    background-color: #099;
    color: #eee;
    border: 0.05rem solid #aaa;
    position: relative;
    top: -0.1rem;
    margin-left: 0.2rem;
    cursor: pointer;
}

.topnav .id-nav .account-weightings.custom {
    background-color: #33f;
}

.topnav .id-nav .account-weightings.model {
    background-color: #096812;
}

.topnav .game_count {
    font-size: 0.8rem;
    margin: 0.4rem 0.25rem 0.25rem;
    overflow: hidden;
    text-overflow: clip;
    max-width: 16rem;
    max-height: 1.3rem;
}

.topnav .right {
    float: right;
}

.topnav .search {
    position: absolute;
    left: 47rem;
    top: 2.2rem;
}

.topnav .search .label {
    display: inline;
}

.topnav .search .input {
    width: 10rem;
    font-size: 0.8rem;
    height: 1.2rem;
    padding-left: 0.4rem;
}

.topnav .topbutton {
    float: right;
    padding: 0.5rem 1rem;
    font-size: 1.4rem;
    background: #066;
    color: #eee;
    border: 0.1rem solid black;
    border-radius: 0.4rem;
    margin: 0.4rem;
    display: none;
}

.footer {
    clear: both;
    margin-top: 2rem;
}

h1 {
    margin: 0px;
    padding: 0.3rem 1.0rem;
    font-size: 1.2rem;
    color: #ccc;
    background: #044;
    border-bottom: 0.1rem solid #999;
}

h1 span {
    font-size: 1.2rem;
}

h1 .subnav {
    font-weight: normal;
    margin-left: 0.8rem;
}

h2 {
    margin: 0.2rem 1.5rem 0.4rem 0rem;
    padding: 0.4rem 0.6rem 0.2rem 0;
    font-size: 1.6rem;
    color: #ccc;
    border-bottom: 0.15rem solid #099;
}

h3 {
    margin: 0.4rem;
    font-size: 1.6rem;
    color: #ddd;
    padding-top: 1.0rem;
}

h4 {
    padding: 0px;
    margin: 0 0 0.8rem 0;
    border-bottom: 0.1rem solid white;
    font-weight: normal;
    font-variant: small-caps;
    font-size: 1.2rem;
}

h5 {
    font-size: 1.1rem;
    color: yellow;
}

.error {
    border-left: 0.4rem solid #ff0a00;
    background: #5a2826;
    color: #ffbab8;
    padding: 0.8rem;
    margin: 1.5rem 1.0rem 0.5rem;
    border-radius: 0 0.8rem 0.8rem 0;
    clear: both;
}

.error li {
    list-style-type: disc;
    padding: 0.2rem 0.6rem;
}

.warn {
    border-left: 0.4rem solid #f97306;
    background: #5a3400;
    color: #ff8a00;
    padding: 0.8rem;
    margin: 1.5rem 1.0rem 0.5rem;
    border-radius: 0 0.8rem 0.8rem 0;
    clear: both;
}

.instructions {
    border-left: 0.4rem solid #077;
    background: #044;
    color: #99ffff;
    padding: 0.8rem;
    margin: 1.5rem 0.5rem 0.5rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.box {
    border-left: 0.4rem solid #272856;
    background: #151a32;
    color: #b5b3ff;
    padding: 0.8rem;
    margin: 1.2rem 1.0rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.box2 {
    border-left: 0.4rem solid #7e1e9c;
    background: #32083a;
    color: #ebf;
    padding: 0.8rem;
    padding-right: 1.2rem;
    margin: 1.2rem 1.0rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.notice {
    border-left: 0.4rem solid #00ff1f;
    background: #357e3e;
    color: #f5fff5;
    padding: 0.8rem;
    margin: 1.5rem 0.5rem 0.5rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.admin {
    border-left: 0.4rem solid #cccc00;
    background: #757e35;
    color: #f5fff5;
    padding: 0.8rem;
    margin: 1.5rem 0.5rem 0.5rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.unavailable {
    border-left: 0.4rem solid #666666;
    background: #525252;
    color: #f7f7f7;
    padding: 0.8rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    border-radius: 0 0.8rem 0.8rem 0;
    text-align: justify;
    clear: both;
}

.warning {
    padding: 0 0.5rem;
    margin: 0;
    background: black;
    color: #f97306;
    border-bottom: 1px solid #6cc;
    text-align: center;
}

.alert {
    padding: 0.2rem 0.5rem;
    margin: 0;
    background: #330;
    color: #ffff00;
    border-bottom: 1px solid #fff;
    text-align: center;
}

.alert p {
    display: inline-block;
    margin: 0;
}

.alert a {
    text-decoration: underline;
}

.alert a.button {
    font-size: 0.7rem;
    padding: 0.05rem 0.3rem;
    border-radius: 0.3rem;
    font-weight: normal;
    background: #cc0;
    color: #222;
    border-color: #999;
    position: relative;
    top: -0.15rem;
}

.alert a.button:hover {
    background: black;
    color: #cc0;
    border-color: #cc0;
}

.solo {
    margin: 5rem auto 2rem;
    width: 30rem;
}

.select-books {
    position: absolute;
    visibility: hidden;
    top: 4rem;
    right: 0.65rem;
    width: 8rem;
    z-index: 5000;
    overflow: auto;
    background-color: #0e1123;
    border-radius: 0.4rem;
}

.select-books .account-books {
    padding: 0.1rem 0.5rem;
    margin: 0.2rem 0;
    border: 1px solid black;
    border-radius: 0.4rem;
    color: #ccc;
    background-color: #055;
    cursor: pointer;
}

.select-books .account-books:hover {
    background-color: #ccc;
    color: black;
}

.select-books .account-books.active {
    background-color: #099;
    color: #eee;
    font-weight: bold;
    border: 0.1rem solid white;
    cursor: auto;
}

.select-weightings {
    position: absolute;
    visibility: hidden;
    top: 4rem;
    right: 0.65rem;
    width: 8rem;
    z-index: 5000;
    overflow: auto;
    background-color: #0e1123;
    border-radius: 0.4rem;
}

.select-weightings .item {
    padding: 0.1rem 0.5rem;
    margin: 0.2rem 0;
    border: 1px solid black;
    border-radius: 0.4rem;
    color: #ccc;
}

.select-weightings .weightings {
    background-color: #055;
    cursor: pointer;
}

.select-weightings .account-weightings {
    background-color: #008;
    cursor: pointer;
}

.select-weightings .item:hover {
    background-color: #ccc;
    color: black;
}

.select-weightings .weightings.active {
    background-color: #099;
    color: #eee;
    font-weight: bold;
    border: 0.1rem solid white;
    cursor: auto;
}

.select-weightings .account-weightings.active {
    background-color: #00f;
    color: #eee;
    font-weight: bold;
    border: 0.1rem solid white;
    cursor: auto;
}

.select-weightings .account-weightings.model {
    background-color: #06470c;
}

.select-weightings .account-weightings.model.active {
    background-color: #096812;
}

/*
@media screen and (min-width: 951px) and (max-width: 1499px) {
    * {
        font-size: 1.5vw;
    }
}
*/

@media screen and (max-device-width: 767px) {
    * {
        font-size: 3.5vw;
    }

    .topnav {
        min-width: auto;
    }

    .topnav .search {
        position: relative;
        left: 1rem;
        top: 0;
    }

    .topnav .search .label {
        display: none;
    }

    .solo {
        width: 27rem;
    }

    .topnav .nav.help-video {
        font-size: 1.4rem;
    }

    .select-weightings,
    .select-books {
        top: 8.5rem;
    }

    .topnav .right {
        float: none;
    }

    .topnav .topbutton {
        display: block;
    }

    .topnav .topmenu,
    .topnav .topmenuright {
        display: none;
    }

    .topnav .nav {
        clear: both;
        float: none;
        padding: 0.5rem;
        font-size: 1.2rem;
    }

    .topnav .subnav-group {
        clear: both;
        float: none;
    }

    .topnav .subnav-group .sub-nav {
        clear: both;
        float: none;
        padding: 0.5rem;
        font-size: 1.2rem;
    }
}

@media screen and (min-device-width: 768px) {
    .subnav-group {
        position: absolute;
        overflow: auto;
        z-index: 5000;
        background: #0e1123;
        border-radius: 0.5rem;
        margin: 0;
        padding: 0 0 0.1rem;
    }

    .subnav-group .sub-nav {
        float: none;
        clear: both;
        width: 8rem;
        margin: 0.2rem 0;
    }

    .top-membership {
        clear: right;
        float: left;
        display: none;
    }
}

/* Newsletter Modal Styles */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.newsletter-modal-content {
    position: relative;
    background: #333;
    border-radius: 1rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
    border: 0.1rem solid #666;
    max-width: 40rem;
    width: 90%;
}

.newsletter-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #666;
    color: #ccc;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-close-btn:hover {
    background: #888;
    color: white;
}

.newsletter-header {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
}

.newsletter-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0ff;
    margin: 0 0 0.5rem 0;
}

.newsletter-subtitle {
    color: #999;
    font-size: 0.875rem;
    margin: 0;
}

.newsletter-body {
    padding: 0 1.5rem 1.5rem;
}

.newsletter-description {
    text-align: center;
    color: #999;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.newsletter-benefits {
    background: linear-gradient(135deg, rgba(64, 64, 64, 0.5), rgba(64, 64, 64, 0.3));
    border-radius: 0.5rem;
    padding: 1rem;
    border: 0.1rem solid rgba(102, 102, 102, 0.5);
    margin-bottom: 1.5rem;
}

.newsletter-benefits-title {
    font-weight: bold;
    color: #0ff;
    font-size: 0.875rem;
    text-align: center;
    margin: 0 0 0.75rem 0;
}

.newsletter-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #ccc;
    font-size: 0.875rem;
}

.newsletter-benefits-list li {
    padding: 0.125rem 0;
    font-weight: 500;
}

.newsletter-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
}

.newsletter-subscribe-btn {
    background: linear-gradient(to right, #0cc, #0ff);
    color: #000;
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 204, 204, 0.2);
}

.newsletter-subscribe-btn:hover {
    background: linear-gradient(to right, #0ff, #0cc);
    box-shadow: 0 0.5rem 1rem rgba(0, 204, 204, 0.3);
    transform: translateY(-0.05rem);
}

.newsletter-later-btn {
    background: transparent;
    border: 0.1rem solid #666;
    color: #999;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-later-btn:hover {
    border-color: #888;
    color: white;
}

.newsletter-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin: 0.75rem 0 0 0;
}

@media screen and (min-width: 640px) {
    .newsletter-buttons {
        flex-direction: row;
    }

    .newsletter-subscribe-btn,
    .newsletter-later-btn {
        flex: 1;
    }
}
