/* Reset and base */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.body-custom {
    background-color: #212428;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-custom {
    background-color: #1e2125 !important;
}
.logo-link {
    margin-left: 0.5%;
}
.logo-img {
    width: 70px;
    border-radius: 50%;
}

/* Navigation links */
#ulButton {
    padding: 0;
    list-style: none;
    text-align: center;
}
#buttonList {
    margin: 15px;
    position: relative;
    padding: 15px 0;
}
#buttonLink {
    color: #3176DC;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.15em;
    display: inline-block;
    position: relative;
}
#buttonLink::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3176DC;
    transform-origin: bottom;
    transition: transform 0.3s ease-out;
}
#buttonLink:hover::after {
    transform: scaleX(1);
    transform-origin: bottom;
}

/* Main content */
#main {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Centered container for error/success and bot card */
.centered-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Bot card */
.bot-card-center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100%;
    margin-top: 50px;
    text-align: center;
}
.bot-card-logo-link {
    display: block;
    text-align: center;
}
.bot-card-logo {
    width: 150px;
    border-radius: 50%;
    margin-bottom: 10%;
}
.bot-card-powered,
.bot-card-links {
    font-size: 11px;
    text-align: center;
}

/* Captcha form */
.captcha-form-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.captcha-form-title {
    margin-bottom: 5%;
}
.captcha-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.captcha-form-btn {
    width: 65%;
    height: 25%;
    max-width: 300px;
    background-color: #3176DC !important;
    color: #fff !important;
    border: none;
    margin-top: 10px;
    display: block;
    font-size: 18px;
    font-weight: 700;
    border-radius: 30px;
    padding: 12px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.captcha-return-btn {
    width: 65%;
    height: 6%;
    max-width: 300px;
    background-color: #3176DC !important;
    color: #fff !important;
    border: none;
    margin-top: 10px;
    display: block;
    font-size: 18px;
    font-weight: 700;
    border-radius: 30px;
    padding: 12px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.captcha-return-btn:hover, .captcha-return-btn:focus {
    background-color: #255bb5 !important;
    color: #fff !important;
    outline: none;
}
.captcha-form-btn:hover, .captcha-form-btn:focus {
    background-color: #255bb5 !important;
    color: #fff !important;
    outline: none;
}

/* Error and success messages */
.error-title, .success-title {
    margin-bottom: 2%;
}
.error-icon {
    color: coral;
}
.success-icon {
    color: lightgreen;
}
.error-message, .success-message {
    margin-bottom: 2%;
    text-align: center;
}

/* General text */
#name {
    color: #3176DC;
    display: inline-block;
    text-align: center;
}
strong {
    color: #3176DC;
    font-weight: bold;
}

/* Footer */
.footer-custom {
    width: 100%;
    text-align: center;
    margin-top: 0;
    flex-shrink: 0;
    padding-bottom: 10px;
    background: none;
    position: relative;
    bottom: 0;
}

/* Buttons */
.btn {
    background: #3176dc;
    border-radius: 30px;
    font-family: "Rubik", sans-serif;
    font-size: 16px;
    font-weight: 700;
    overflow: hidden;
    line-height: 1;
    padding: 12px 32px;
    position: relative;
}
.btn:focus {
    box-shadow: none;
    outline: 0;
}
.btn-default {
    color: #FFF;
    background: #3176dc;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
}
.btn-default:hover {
    color: #FFF;
    animation-name: button-push;
    animation-duration: 0.3s;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}
@keyframes button-push {
    50% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

/* --- Drawer styles for mobile --- */
.drawer-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    margin-left: auto;
    margin-right: 10px;
    cursor: pointer;
    z-index: 1101;
}
.drawer-toggle-bar {
    width: 28px;
    height: 4px;
    background: #3176DC;
    margin: 3px 0;
    border-radius: 2px;
    display: block;
    transition: all 0.3s;
}
/* Drawer slide animation and backdrop blur/dark */
.drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;
    height: 100%;
    background: #1e2125;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    z-index: 1100;
    padding-top: 60px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.drawer.open {
    display: block;
}
.drawer.opening {
    animation: drawer-slide-in 0.35s cubic-bezier(.4,0,.2,1) forwards;
}
.drawer.closing {
    animation: drawer-slide-out 0.35s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes drawer-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
@keyframes drawer-slide-out {
    from { transform: translateX(0); }
    to   { transform: translateX(100%); }
}

.drawer-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,20,30,0.55);
    z-index: 1099;
    transition: backdrop-filter 0.3s;
    backdrop-filter: none;
}
.drawer-backdrop.open {
    display: block;
    backdrop-filter: blur(4px);
}

/* Blur and darken the rest of the page when drawer is open */
body.drawer-open > *:not(nav):not(#drawer):not(#drawer-backdrop) {
    filter: blur(4px) brightness(0.7);
    transition: filter 0.3s;
    pointer-events: none;
    user-select: none;
}

.drawer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.drawer-nav li {
    margin: 24px 0;
    text-align: left;
    padding-left: 24px;
}
.drawer-nav a {
    color: #3176DC;
    text-decoration: none;
    font-size: 1.2em;
}

/* Responsive navbar and logo size */
@media (max-width: 900px) {
    .desktop-nav {
        display: none !important;
    }
    .drawer-toggle {
        display: flex;
    }
    .logo-img {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
    .captcha-form-container {
        max-width: 95vw;
    }
    .captcha-form-btn {
        max-width: 65%;
        font-size: 16px;
        padding: 12px 0;
    }
}
@media (min-width: 901px) {
    .drawer, .drawer-backdrop {
        display: none !important;
    }
    .drawer-toggle {
        display: none !important;
    }
}