@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Fredoka:wght@400;500;600;700&family=Noto+Sans:wght@400;500;700&display=swap');

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: black;
}

body.auth-locked #mainContent,
body.auth-locked #halloweenOverContent,
body.auth-locked #popup,
body.auth-locked #tooltip,
body:not(.auth-locked) #loginGate {
    display: none !important;
}

.login-gate {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #10100f;
    background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 140, 0, 0.035) 18px 19px);
}

.login-panel {
    width: min(380px, 100%);
    padding: 28px;
    border: 1px solid #ff8c00;
    border-radius: 6px;
    background: #191817;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    color: #f2f2f2;
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
}

.login-panel h1 {
    margin: 0 0 24px;
    color: #ff8c00;
    font-family: 'Creepster', cursive;
    font-size: 42px;
    font-weight: normal;
    text-align: center;
}

.login-panel label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.login-controls {
    display: flex;
    gap: 8px;
}

.login-controls input {
    min-width: 0;
    flex: 1;
    padding: 10px;
    border: 1px solid #777;
    border-radius: 4px;
    background: #10100f;
    color: #fff;
    font: inherit;
}

.login-controls input:focus {
    outline: 2px solid #ff8c00;
    outline-offset: 1px;
}

.login-controls button {
    padding: 9px 14px;
    border: 1px solid #ff8c00;
    border-radius: 4px;
    background: #382214;
    color: #ffb347;
    cursor: pointer;
    font: inherit;
}

.login-controls button:hover {
    background: #4a2b17;
}

#loginMessage {
    min-height: 1.4em;
    margin: 14px 0 0;
    color: #ff7f7f;
    font-size: 13px;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: auto;
    padding: 15px 20px;

    background: linear-gradient(135deg, #1a1a1a 0%, #2d1810 50%, #1a1a1a 100%);
    color: white;
    border-bottom: 3px solid #ff8c00;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    z-index: 1000;
}

.header-logo {
    position: absolute;
    left: 20px;
}

.header-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.6));
}

.header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.header-title {
    font-family: 'Creepster', cursive;
    font-size: 32px;
    font-weight: normal;
    color: #ff8c00;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.header-info {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #e0e0e0;
    align-items: center;
}

.current-date,
.countdown,
.caught-count {
    font-family: 'Fredoka', sans-serif;
    letter-spacing: 1px;
}

.current-date {
    color: #ffb347;
}

.countdown {
    color: #ff6347;
    font-weight: bold;
}

.caught-count {
    color: #8cff66;
    font-weight: bold;
}

.separator {
    color: #ff8c00;
}

.nsfw-btn {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    background-color: #d32f2f;
    color: white;
    border: 2px solid #ff6347;
    border-radius: 4px;
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
}

.nsfw-btn:hover {
    background-color: #ff1744;
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.nsfw-btn:active {
    transform: translateY(-50%) scale(0.95);
}

#halloween {
    width: 80%;
    height: auto;

    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 2%,
            black 98%,
            transparent 100%);

    mask-image: linear-gradient(to right,
            transparent 0%,
            black 2%,
            black 98%,
            transparent 100%);
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 0 10px;
    background: rgba(17, 17, 17, 0.95);
    border-top: 2px solid #ff8c00;
    text-align: center;
    z-index: 999;
}

.code-checker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}

.code-checker-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-checker-input {
    width: 230px;
    max-width: 60vw;
    padding: 4px 8px;
    border: 1px solid #ff8c00;
    border-radius: 4px;
    background: #1a1a1a;
    color: #f2f2f2;
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 12px;
}

.code-checker-input:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(255, 140, 0, 0.6);
}

.code-checker-btn {
    padding: 4px 10px;
    border: 1px solid #ff8c00;
    border-radius: 4px;
    background: #2d1810;
    color: #ff8c00;
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.code-checker-btn:hover {
    background: #3a2015;
}

.code-checker-btn:disabled,
.code-checker-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.code-checker-status {
    min-height: 16px;
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    color: #cfcfcf;
}

.code-checker-status.valid {
    color: #8cff66;
}

.code-checker-status.invalid {
    color: #ff7f7f;
}

.code-checker-status.locked {
    color: #ff5252;
}

#footer p {
    margin: 0;
    padding: 0;
    font-family: 'Fredoka', sans-serif;
    font-weight: normal;
    font-size: 10px;
    color: #e0e0e0;
    letter-spacing: 0.5px;
}

.music-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 4px;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-size: 16px;
}

.music-btn:hover {
    transform: translateY(-50%) scale(1.2);
}

.music-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.flying-ghost {
    position: fixed;
    pointer-events: auto;
    cursor: crosshair;
    filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.3));
    z-index: 998;
}

#mainContent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#halloweenOverContent {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

#halloweenOverContent.visible {
    display: flex;
}

.halloween-over-message {
    text-align: center;
}

.halloween-over-message p {
    font-family: 'Creepster', cursive;
    font-size: 72px;
    font-weight: bold;
    color: #ff8c00;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.9);
    margin: 20px 0;
    letter-spacing: 3px;
}

.halloween-over-message p:first-child {
    font-size: 80px;
    margin-bottom: 40px;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.popup.show {
    display: flex;
}

.popup-content {
    background-color: #1a1a1a;
    border: 3px solid #ff8c00;
    border-radius: 10px;
    padding: 30px 40px;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 0 30px rgba(255, 140, 0, 0.5);
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#popupMessage {
    font-family: 'Noto Sans', 'Fredoka', sans-serif;
    font-size: 18px;
    color: #ff8c00;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

#popupImage {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #ff8c00;
    cursor: pointer;
    transition: transform 0.2s;
}

.popup-close:hover {
    transform: scale(1.3);
}

.tooltip {
    position: fixed;
    background-color: #1a1a1a;
    color: #ff8c00;
    padding: 8px 12px;
    border: 2px solid #ff8c00;
    border-radius: 5px;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    z-index: 2999;
    pointer-events: none;
    white-space: normal;
    max-width: 300px;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    text-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
    visibility: hidden;
}

.tooltip.show {
    visibility: visible;
}

/* Tooltip content helper classes (used inside tooltip HTML text) */
.tooltip-center {
    display: block;
    text-align: center;
}

.tooltip-left {
    display: block;
    text-align: left;
}

.tooltip-right {
    display: block;
    text-align: right;
}

.tooltip-justify {
    display: block;
    text-align: justify;
    text-justify: inter-word;
}

.tooltip-polish {
    font-family: 'Noto Sans', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.35;
}