:root {
    --dark-grey: #151516;
    --light-grey: #1e1e20;
    --gold: #efbd41;
    --border-grey: #38383b;
    --text-grey: #96969C;
    --text-background-grey: #2a2a2d;
    --color-bg: var(--dark-grey);
    --color-container: var(--light-grey);
    --color-header: var(--gold);

    --color-text: #f0f0f0;
    --color-accent: var(--gold);
    --color-accent-hover: var(--gold);
    --color-btn-text: #151516;
    --color-btn-hover-text: #111;
    --color-btn-hover: #99761E;
    --color-border: #e0e0e0;
    --color-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1.5px 4px rgba(0,0,0,0.04);
    --color-btn-shadow: 0 2px 8px rgba(247,179,43,0.08);
}

@font-face {
    font-family: 'PressStart2P';
    src: url('/static/PressStart2P.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }

html {
  height: 100%;
}

body {
  min-height: 100vh; 
  display: flex;
  flex-direction: column;
  background: url('/static/background-tile.png') repeat;
  font-family: 'DejaVu Sans Mono', 'Menlo', 'Consolas', 'Monaco', 'Liberation Mono', 'Courier New', monospace;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

html {
    cursor: url('/static/cursor.png'), auto;
}
a:hover, button:hover, input:hover, textarea:hover, select:hover, #backToTop:hover, svg:hover, line:hover, polyline:hover {
    cursor: url('/static/cursor-hover.png'), auto;
}

.container {
    background: var(--color-container);
    max-width: 600px;
    margin: 40px auto 40px auto;
    border-radius: 12px;
    box-shadow: var(--color-shadow);
    padding: 32px 28px 28px 28px;
    text-align: center;
}

h1 {
    font-size: 1.7em;
    font-weight: 200;
    margin-bottom: 40px;
    color: var(--color-header);
    font-family: 'PressStart2P', sans-serif;
}

p {
    font-size: 1.1em;
}

.main-btn {
    background: var(--color-accent);
    color: var(--color-btn-text);
    border: none;
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: url('/static/cursor-hover.png'), auto;
    transition: background 0.2s, color 0.2s;
    box-shadow: var(--color-btn-shadow);
}
.main-btn:hover {
    background: var(--color-btn-hover);
    color: var(--color-btn-hover-text);
}

.answer-link a{
    background: var(--color-accent);
    color: var(--color-btn-text);
    border: none;
    border-radius: 6px;
    padding: 5px 20px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: url('/static/cursor-hover.png'), auto;
    transition: background 0.2s, color 0.2s;
    box-shadow: var(--color-btn-shadow);
}
.answer-link a:hover {
    background: var(--color-btn-hover);
    color: var(--color-btn-hover-text);
    text-decoration: none;
}
.answer-option {
    margin: 10px 0;
    text-align: left;
}

.custom-answer, .comment-box {
    margin: 12px 0;
    text-align: left;
}
.video-title {
    text-align: left;
}

input[type="text"], textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    font-size: 1em;
    margin-top: 4px;
    box-sizing: border-box;
    background: var(--text-background-grey);
    color: var(--text-grey);
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #aaaaaa;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--gold);       
  box-shadow: 0 0 0 2px #efbd4133; 
}

textarea {
    min-height: 60px;
    resize: vertical;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
} 

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--border-grey);
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--text-background-grey);
    color: var(--text-grey);
  }
  .autocomplete-items div {
    padding: 10px;
    border-bottom: 1px solid var(--border-grey);
  }
  .autocomplete-items div:hover, .autocomplete-active {
    background-color: var(--light-grey);
    cursor: url('/static/cursor-hover.png'), auto;
  }

.landing-container-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
}
.landing-image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
}
.landing-image img {
    max-height: 450px;
    width: auto;
    border-radius: 12px;
    box-shadow: var(--color-shadow);
    background: var(--color-container);
    padding: 6px;
}
.landing-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 300px; 
}
.landing-content p {
    text-align: center;
    width: 100%;
}
.landing-content a {
    display: block;
    width: 100%;
    margin-bottom: 16px;
}
.landing-content .main-btn {
    width: 100%;
    margin: 0 0 16px 0;
}
@media (max-width: 700px) {
    .landing-container-flex {
        flex-direction: column;
        gap: 18px;
    }
    .landing-image {
        height: 120px;
    }
    .landing-image img {
        max-height: 120px;
    }
    .landing-content {
        min-width: 0;
        width: 100%;
        align-items: center;
    }
    .container {
        max-width: 98vw;
        margin: 16px 1vw 16px 1vw;
        padding: 18px 6vw 18px 6vw;
    }
    h1 {
        font-size: 1.1em;
        margin-bottom: 24px;
    }
    .main-btn {
        font-size: 1em;
        padding: 10px 0;
    }
    .answer-image {
        max-width: 90vw;
        height: auto;
    }
    iframe {
        width: 90vw !important;
        max-width: 90vw !important;
        height: 180px !important;
    }
    input[type="text"], textarea {
        font-size: 1em;
        padding: 8px;
    }
    .site-footer {
        font-size: 0.9em;
        margin-top: 18px;
        margin-bottom: 0;
        padding: 12px 0 8px 0;
    }
    .back-to-top {
        z-index: 10000;
    }
}
@media (max-width: 500px) {
    .container {
        padding: 10px 4vw 10px 4vw;
    }
    .main-btn {
        font-size: 0.95em;
        padding: 8px 0;
    }
    h1 {
        font-size: 1.5em;
    }
}
@media (max-width: 400px) {
    .container {
        padding: 4px 4vw 7vw 4vw;
    }
    .main-btn {
        font-size: 0.9em;
        padding: 8px 8px;
    }
    h1 {
        font-size: 1.4em;
    }
}

.landing-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 18px;
    aspect-ratio: 320 / 180; /* Reserve space to prevent layout shift - adjust ratio based on actual logo dimensions */
    object-fit: contain;
}

iframe {
    margin-top: 15px;
    margin-bottom: 50px;
    border-color: var(--color-header);
    border-width: 3px;
}
iframe:hover {
    transform: scale(1.03);
    transition: transform 0.2s ease;
}

.answer-image {
    max-width: 300px;
    display: block;
    margin-top: 15px;
    margin-bottom: 15px;
}

.answer-long-text {
    margin: 8px 0;
    padding-left: 16px;
    border-left: 3px solid #ccc;
    color: #555;
}

.custom-answer {
    position: relative;
}

.hidden {
    display: none;
}

.site-footer {
    margin-top: auto;
    width: 100%;
    text-align: center;
    color: #eee;
    background: rgba(30, 30, 32, 0.96);
    border-top: 1px solid #333;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    padding: 12px 0;
}
.site-footer a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 400;
}
.site-footer a:hover {
    color: var(--color-btn-hover);
}

.after-exit-actions {
    text-align: center;
    margin-top: 32px;
}
.after-exit-actions p {
    margin-bottom: 18px;
    font-size: 1.1em;
    color: var(--color-header);
}
.after-exit-actions a {
    display: inline-block;
    margin: 0 8px 12px 8px;
}
@media (max-width: 700px) {
    .after-exit-actions a {
        display: block;
        margin: 0 0 12px 0;
    }
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 80px;
    z-index: 200;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-btn-text);
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    font-size: 2em;
    font-weight: bold;
    cursor: url('/static/cursor-hover.png'), auto;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    opacity: 0.92;
    pointer-events: auto; 
}

.back-to-top svg {
    pointer-events: none;
}

.back-to-top:hover, .back-to-top:focus {
    background: var(--color-btn-hover);
    color: var(--color-btn-hover-text);
    cursor: url('/static/cursor-hover.png'), auto;
    outline: none;
    opacity: 1;
}
@media (max-width: 700px) {
    .back-to-top {
        right: 12px;
        bottom: 72px;
        width: 42px;
        height: 42px;
        font-size: 1.5em;
    }
}

.site-navbar {
    width: 100%;
    text-align: center;
    font-size: 1em;
    color: #eee;
    background: rgba(30, 30, 32, 0.96);
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px 0 10px 0;
    position: relative;
    z-index: 20;
    margin-bottom: 24px;
}
.site-navbar .nav-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    margin: 0 18px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
    font-family: 'PressStart2P', sans-serif;
}
.site-navbar .nav-link:hover, .site-navbar .nav-link:focus {
    background: var(--color-btn-hover);
    color: var(--color-btn-hover-text);
    outline: none;
}
@media (max-width: 700px) {
    .site-navbar {
        font-size: 0.95em;
        padding: 10px 0 8px 0;
        margin-bottom: 16px;
    }
    .site-navbar .nav-link {
        margin: 0 8px;
        padding: 10px 6px;
        font-size: 1em;
    }
}

/* Hide the default radio button */
.custom-radio input[type="radio"] {
    display: none;
}
.custom-radio label {
    display: flex;
    align-items: center;
    font-size: 1.3em;
    margin-bottom: 0.5em;
    margin-right: 0.5em;
    word-break: break-word; 
    font-weight: bold;
    cursor: url('/static/cursor.png'), auto;
}
.custom-radio .radio-mark {
    flex-shrink: 0;
    height: 15px;
    width: 15px;
    border: 3px solid var(--color-accent); 
    border-radius: 50%;
    position: relative;
    background: var(--light-grey);
    transition: border-color 0.2s;
    margin-right: 0.5em;
}
.custom-radio .radio-mark:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
    cursor: url('/static/cursor-hover.png'), auto;
}

.custom-radio input[type="radio"]:checked + .radio-mark {
    border-color: var(--color-accent);
    background: var(--color-accent);
}
.custom-radio .radio-mark::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    position: absolute;
    top: 4px;
    left: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.custom-radio input[type="radio"]:checked + .radio-mark::after {
    opacity: 1;
    background: var(--color-accent);
}

/* Lightbox overlay for expanding images */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    border-radius: 8px;
}
.lightbox-overlay, .lightbox-overlay img {
    cursor: url('/static/cursor-hover.png'), zoom-out;
}
.answer-image {
    cursor: url('/static/cursor-hover.png'), zoom-in;
}

/* Login Required Page Styles */
.login-required-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.login-required-content {
    text-align: center;
    max-width: 600px;
    background: var(--color-container);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--color-shadow);
    border: 1px solid var(--border-grey);
    min-height: 400px; /* Reserve space to prevent layout shift */

    img {
        margin: 0 auto;
    }
}

.login-message h2 {
    color: var(--color-header);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.login-message p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-reasons {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: var(--text-background-grey);
    border-radius: 8px;
    border: 1px solid var(--border-grey);
}

.login-reasons h3 {
    color: var(--color-header);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.login-reasons ul {
    list-style-type: none;
    padding: 0;
}

.login-reasons li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.login-reasons li:before {
    content: "✓";
    color: var(--color-header);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.login-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Mobile styles for login-required page */
@media (max-width: 700px) {
    .login-required-container {
        min-height: 60vh;
        padding: 5px;
        align-items: flex-start;
    }
    
    .login-required-content {
        max-width: 100vw;
        width: 100%;
        padding: 15px 10px;
        margin: 0;
        box-sizing: border-box;
    }
    
    .login-message h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .login-message p {
        font-size: 0.9em;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .login-reasons {
        margin: 15px 0;
        padding: 10px;
    }
    
    .login-reasons h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .login-reasons li {
        font-size: 0.85em;
        padding: 4px 0;
        padding-left: 16px;
        line-height: 1.3;
    }
    
    .login-actions {
        margin-top: 15px;
    }
    
    .discord-login-btn {
        width: 100%;
    }
    
    .discord-login-btn button {
        width: 100%;
        font-size: 0.9em;
        padding: 10px 0;
    }
}

@media (max-width: 500px) {
    .login-required-container {
        padding: 2px;
        min-height: 50vh;
    }
    
    .login-required-content {
        padding: 10px 8px;
    }
    
    .login-message h2 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .login-message p {
        font-size: 0.85em;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .login-reasons {
        padding: 8px;
        margin: 12px 0;
    }
    
    .login-reasons h3 {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    
    .login-reasons li {
        font-size: 0.8em;
        padding: 3px 0;
        padding-left: 14px;
        line-height: 1.2;
    }
    
    .discord-login-btn button {
        font-size: 0.85em;
        padding: 8px 0;
    }
}

@media (max-width: 400px) {
    .login-required-container {
        padding: 1px;
    }
    
    .login-required-content {
        padding: 8px 6px;
    }
    
    .login-message h2 {
        font-size: 1em;
    }
    
    .login-message p {
        font-size: 0.8em;
    }
    
    .login-reasons {
        padding: 6px;
    }
    
    .login-reasons h3 {
        font-size: 0.9em;
    }
    
    .login-reasons li {
        font-size: 0.75em;
        padding: 2px 0;
        padding-left: 12px;
    }
    
    .discord-login-btn button {
        font-size: 0.8em;
        padding: 6px 0;
    }
}

.discord-btn {
    background: #5865F2;
    color: white;
    border: none;
    font-weight: bold;
}

.discord-btn:hover {
    background: #4752C4;
    color: white;
}

.secondary-btn {
    background: var(--text-background-grey);
    color: var(--color-text);
    border: 1px solid var(--border-grey);
}

.secondary-btn:hover {
    background: var(--border-grey);
    color: var(--color-text);
}

/* Landing Page Updates */
.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.login-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--text-background-grey);
    border-radius: 8px;
    border: 1px solid var(--border-grey);
}

.login-section p {
    margin-bottom: 15px;
    color: var(--text-grey);
}

.bold-gold {
    color: var(--color-accent);
    font-weight: 600;
}

.falling-grunio {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    user-select: none;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}