html {
    position: relative;
    min-height: 100%;
    background: #141b2d;
    overflow-x: hidden;
}

html::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../img/halo2bg2.webp") repeat center center;
    filter: brightness(0.9);
    z-index: -1;
    pointer-events: none;
}

html, body {
    min-width: 260px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* === MAIN CONTENT === */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}


h1 {
    color: #7bb5e9;
    text-align: center;
    font-size: 2.2em;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(123, 181, 233, 0.3);
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 10px 0 15px 0;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 15px;
}

.logo-section {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.title-section {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Responsive header layout */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        margin: 5px 0 10px 0;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .title-section {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
        margin-bottom: 12px;
    }
}

h2 {
    color: #5c9bd1;
    font-size: 1.5em;
    margin-bottom: 8px;
}



/* Container styles */
#form-container {
    position: relative;
    background-color: rgba(16, 26, 35, 0.95);
    border: 1px solid #2a4356;
    border-radius: 8px;
    padding: 15px;
    padding-top: 25px;
    max-width: 760px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    margin: 8px auto;
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    color: #7bb5e9;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

input, select, textarea {
    background-color: #1a2733;
    border: 1px solid #2a4356;
    color: #e0e0e0;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #5c9bd1;
    box-shadow: 0 0 5px rgba(92, 155, 209, 0.5);
}

textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 150px;
}

/* Button styles */
button {
    background-color: #2a4356;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    text-transform: uppercase;
}

button:hover {
    background-color: #3a5876;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

#login-button {
    background: linear-gradient(45deg, #5c9bd1, #7bb5e9);
    color: white;
    padding: 10px 35px;
    font-size: 0.8em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(92, 155, 209, 0.3);
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

#logout-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #c93434;
    padding: 6px 12px;
    font-size: 0.75em;
    margin: 0;
    min-width: auto;
}

#logout-button:hover {
    background-color: #e04141;
}

#message {
    text-align: center;
    padding: 6px;
    margin-top: 8px;
    border-radius: 4px;
}

.error {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 15px;
    border-radius: 4px;
    font-size: 1.1em;
    text-align: center;
    margin-top: 20px;
}

.success {
    color: #44ff44;
    background-color: rgba(68, 255, 68, 0.1);
    border: 1px solid rgba(68, 255, 68, 0.3);
    padding: 8px;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {

    #form-container {
        padding: 20px 15px;
        width: 95%;
        margin-top: 15px;
    }

    form {
        gap: 15px;
    }

    input, select, textarea {
        font-size: 16px;
        padding: 12px;
        margin-bottom: 5px;
        -webkit-appearance: none;
    appearance: none;
        border-radius: 4px;
    }

    button {
        min-height: 44px;
        padding: 12px 20px;
        margin: 5px 0;
        font-size: 16px;
    }

    #logout-button {
        min-height: 36px;
        padding: 8px 16px;
        font-size: 14px;
        top: 12px;
        right: 12px;
    }

    h1 {
        font-size: 1.8em;
        margin: 15px 0;
        padding: 0 10px;
        word-wrap: break-word;
    }

    h2 {
        font-size: 1.2em;
        padding: 0 5px;
        margin-top: 5px;
        margin-bottom: 15px;
    }

    .error, .success {
        padding: 12px;
        margin: 10px 5px;
        font-size: 14px;
    }

    .login-container {
        padding: 20px;
        gap: 20px;
    }

    .discord-icon-placeholder {
        width: 56px;
        height: 56px;
    }

    .discord-icon {
        width: 32px;
        height: 32px;
    }
}

@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        -webkit-appearance: none;
        appearance: none;
    }

    select {
        background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 30px;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }
}

input:invalid, select:invalid, textarea:invalid {
    border-color: #ff4444;
}

@media (hover: none) {
    button:active {
        background-color: #3a5876;
        transform: translateY(1px);
    }

    #login-button:active {
        background-color: #7bb5e9;
        transform: translateY(1px);
    }

    #logout-button:active {
        background-color: #e04141;
    }
}

#guide-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
	width: 100%;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    background: linear-gradient(145deg, rgb(17 31 49), rgb(30 48 71));
    border: 1px solid #2a4356;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
	box-sizing: border-box;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #7bb5e9, transparent);
    animation: shimmer 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container p {
    color: #e0e0e0;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 10px;
    max-width: 96%;
    text-align: justify;
    text-justify: inter-word;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    display: block; 
}

.login-container p + p {
    margin-top: 5px;
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 35px;
    pointer-events: none;
    margin: 15px 0;
    padding: 0;
}

.login-image {
    min-width: 200px;
    max-width: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-flex-shrink: 1;
    flex-shrink: 1;
}

.discord-icon-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #1a2733;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #5c9bd1;
    box-shadow: 0 0 10px rgba(92, 155, 209, 0.3);
    animation: pulse 2s infinite;
    margin: 10px 0;
}

.discord-icon {
    width: 40px;
    height: 40px;
    color: #5c9bd1;
}

/* #login-button {
    background: linear-gradient(45deg, #5c9bd1, #7bb5e9);
    color: white;
    padding: 15px 30px 12px;
    font-size: 1.2em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(92, 155, 209, 0.3);
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
} */

#login-area {
	justify-content: center;
	display: flex;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7em;
    margin: 0;
    text-align: center;
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    66.67% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    66.67% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.status-container {
    background-color: rgba(16, 26, 35, 0.95);
    border: 1px solid #2a4356;
    border-radius: 8px;
    padding: 30px;
    padding-bottom: 80px;
    max-width: 400px;
    width: 90%;
    height: auto;
    min-height: 100px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading {
    position: relative;
    padding: 20px;
    color: #7bb5e9;
    font-size: 1.2em;
}

.loading::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    top: calc(100% + 10px);
    left: 50%;
    margin-left: -20px;
    border: 4px solid #2a4356;
    border-top: 4px solid #5c9bd1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .status-container {
        padding: 20px;
        padding-bottom: 70px;
        width: 85%;
        min-height: 180px;
    }

    .login-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .login-image.about {
        display: none;
    }
    
    .login-image {
        min-width: 175px;
        max-width: 275px;
        width: 100%;
    }
}

@supports (-webkit-touch-callout: none) {
    .login-image {
        width: clamp(200px, 100%, 300px);
    min-width: 200px;
    max-width: 300px;
    -webkit-min-width: 200px;
    -webkit-max-width: 300px;
    }
}

@media (max-width: 1024px) {
    .login-image {
        min-width: 200px;
        max-width: 250px;
        -webkit-max-width: 250px;
    }
}

@media (max-width: 800px) {
    .login-image {
        min-width: 200px;
        max-width: 225px;
        -webkit-max-width: 225px;
    }
}

@media (max-width: 600px) {
    .login-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .login-image.about {
        display: none;
    }
    
    .login-image {
        min-width: 200px;
        max-width: 300px;
        -webkit-max-width: 300px;
        width: 100%;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(92, 155, 209, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(92, 155, 209, 0.5);
    }
    100% {
        box-shadow: 0 0 10px rgba(92, 155, 209, 0.3);
    }
}

.promo-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
}

.promo-box {
    flex: 1;
    min-width: 0;
    background: linear-gradient(145deg, rgb(17 31 49), rgb(30 48 71));;
    border: 1px solid #2a4356;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.promo-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.promo-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    max-width: 64px;
}

.discord-promo-icon, .download-icon {
    width: 100%;
    height: 100%;
    color: #aebdcc;
    max-width: 64px;
}

.promo-box h3 {
    color: #c1e2ff;
    font-size: clamp(18px, 3.5vw, 24px);
    margin: 0 auto;
    padding: 0 5px;
    text-shadow: 0 0 10px rgba(123, 181, 233, 0.3);
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
}

.promo-box p {
    color: #e0e0e0;
    font-size: 1.1em;
    margin: 10px 0 20px;
    min-height: 55px;
}

.promo-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.promo-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.discord-button {
    background-color: #5865F2;
    color: white;
}

.download-button {
    background-color: #2c9812;
    color: white;
}

.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shine 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    66.67% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    66.67% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

@media (max-width: 768px) {
    .promo-container {
        flex-direction: column;
        width: 85%; 
        margin: 15px auto;
        gap: 15px;
        padding: 0;
        max-width: 500px;
        min-width: 250px;
    }

    .promo-box {
        width: 100%;
        padding: 20px 15px;
        margin: 0;
        box-sizing: border-box;
    }

    .promo-box h3 {
        font-size: clamp(16px, 3.2vw, 22px);
    }

    .promo-box p {
        font-size: 0.95em;
        min-height: auto;
        margin: 8px 0 15px;
    }

    .promo-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .promo-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }
}

@media (max-width: 600px) {
    .promo-container {
        width: 85%;
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .promo-container {
        width: 85%;
        margin: 12px auto;
    }

    .promo-box {
        padding: 15px;
        width: 100%;
        margin: 0;
    }

    .promo-box h3 {
        font-size: clamp(15px, 3vw, 20px);
    }
}

@media (max-width: 320px) {
    .promo-container {
        width: 85%;
    }

    .promo-box {
        padding: 15px 12px;
    }
    
    .promo-box h3 {
        font-size: clamp(14px, 2.8vw, 18px);
    }
}

select#location, select#requestType {
    background-color: #1a2733;
    color: #e0e0e0;
    padding: 8px 12px;
    border: 1px solid #2a4356;
    border-radius: 4px;
    width: 100%;
    font-size: 1em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23e0e0e0' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 32px;
}

select#location:focus, select#requestType:focus {
    outline: none;
    border-color: #5c9bd1;
    box-shadow: 0 0 5px rgba(92, 155, 209, 0.5);
}

select#location option, select#requestType option {
    background-color: #1a2733;
    color: #e0e0e0;
    padding: 8px;
}

/* Add mobile-specific improvements */
@media (max-width: 768px) {
    select#location {
        font-size: 16px;
        padding: 12px;
        padding-right: 36px;
    }
}

.contributors {
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
    text-align: center;
}

.contributors p {
    color: #a1c8ea;
    font-size: min(14px, 2.8vw);
    white-space: nowrap;
    margin: 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

@media (max-width: 768px) {
    .contributors p {
        font-size: min(11px, 2.4vw);
    }
}

@media (max-width: 480px) {
    .contributors p {
        font-size: min(9px, 2vw);
    }
}

@media (max-width: 320px) {
    .contributors p {
        font-size: min(7px, 1.8vw);
    }
}

.spoiler-container {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 25px;
    padding-top: 0;
    padding-bottom: 20px;
    border-top: none;
    border-bottom: 1px solid rgba(92, 155, 209, 0.3);
}

.spoiler-toggle {
    background: none;
    border: none;
    color: #d0edff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.1em;
    font-weight: 600;
    gap: 2px;
    margin: 0 auto;
    padding: 8px;
    text-align: center;
    transition: color 0.2s;
    width: fit-content;
    position: relative;
}

.spoiler-toggle:hover {
    color: #a3adbf;
    background: none;
    transform: none;
}

.spoiler-toggle::before {
    content: "▶";
	content: "\25B6";
    display: inline-block;
    font-size: 0.8em;
    transition: transform 0.3s;
    position: absolute;
    left: -15px;
    top: 9px;
}

.spoiler-title {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.spoiler-toggle.active::before {
    transform: rotate(90deg);
}

.spoiler-content {
    background: rgb(10 22 43 / 62%);
    border: 1px solid #2a4356;
    border-radius: 8px;
    height: 0;
    margin: 0 auto;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transition: opacity 0.3s ease-out, max-height 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
    width: 95%;
    text-align: left;
}

.spoiler-content.active {
    height: auto;
    max-height: 5500px;
    opacity: 1;
    padding: 15px;
    margin-top: 15px;
}

.guide-section {
    margin-bottom: 20px;
}

.guide-title {
    color: #7bb5e9;
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: left;
}

.guide-list {
    list-style-type: none;
    padding-left: 15px;
    margin: 0;
}

.guide-list li {
    color: #efefef;
    line-height: 1.4;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
    font-size: 0.9em;
    text-align: left;
}

.guide-list li::before {
    content: "•";
    color: #5c9bd1;
    position: absolute;
    left: 0;
    top: 0;
}

.guide-list li a {
    color: #a1c8ea;
    text-decoration: none;
    font-size: 0.95em;
    word-break: break-all;
}

.guide-list li a:hover {
    text-decoration: underline;
}

.guide-note {
    background: rgba(92, 155, 209, 0.1);
    color: #e0e0e0;
    font-style: italic;
    padding: 2px 10px;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .spoiler-container {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .spoiler-content.active {
        padding: 12px;
    }
    
    .guide-title {
        font-size: 1em;
    }
    
    .guide-list {
        padding-left: 10px;
    }
    
    .guide-list li {
        font-size: 0.85em;
    }
    
    .guide-note {
        font-size: 0.8em;
    }
}

.guide-list li.indented {
    padding-left: 30px;
}

.guide-list li.indented::before {
    left: 15px;  
}

.guide-list li.double-indented {
    padding-left: 45px; 
}

.guide-list li.double-indented::before {
    left: 30px;
}

.time-estimate {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.8em;
    font-weight: 400;
    font-style: italic;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(42, 67, 86, 0.4);
}

@media (max-width: 768px) {
    .time-estimate {
        font-size: 0.75em;
        padding: 1px 4px;
        margin-left: 6px;
    }
}

.expand-hint {
    color: rgba(161, 200, 234, 0.7);
    font-size: 0.65em;
    font-style: italic;
    transition: opacity 0.2s ease;
    margin-top: 1px;
    text-transform: none;
}

.spoiler-toggle.active .expand-hint {
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 768px) {
    .expand-hint {
        font-size: 0.6em;
    }
}
