body {
    font-family: 'Estrangelo Edessa', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

header {
    padding: 1rem;
}

h1 {
    font-size: 2rem;
    text-transform: lowercase;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

main {
    padding: 1rem;
    margin-top: 100vh;
    /* Push content below the fold */
}

#contact {
    padding: 2rem;
    background-color: transparent;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

label {
    font-size: 1.2rem;
}

input,
textarea {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 0.75rem;
    font-size: 1.2rem;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Custom form field container */
.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Custom error tooltip - matches dark futuristic theme */
.error-tooltip {
    display: none;
    position: absolute;
    bottom: -1.8rem;
    left: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ff6b6b;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    z-index: 100;
    white-space: nowrap;
    font-family: 'Estrangelo Edessa', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.error-tooltip.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Invalid field styling */
input.invalid,
textarea.invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

/* Connection refused popup */
#connection-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#connection-popup.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #ff6b6b;
    border-radius: 8px;
    padding: 2rem 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.popup-content.success {
    border-color: #4ade80;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
}

.popup-content.success .popup-icon,
.popup-content.success .popup-message {
    color: #4ade80;
}

.popup-icon {
    font-size: 2rem;
    color: #ff6b6b;
}

.popup-message {
    font-family: 'Estrangelo Edessa', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.5rem;
    color: #ff6b6b;
}

.popup-close {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #ff6b6b;
    color: #000;
}

/* Honeypot field - hidden from humans */
#hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* CAPTCHA Challenge Styles */
.captcha-challenge {
    display: none;
    /* Hidden until first transmit attempt */
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    border: 1px solid #333;
    border-radius: 8px;
}

.captcha-challenge.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.captcha-label {
    display: block;
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 0.75rem;
}

.captcha-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#captcha-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #333;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

#captcha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    cursor: grab;
    transition: transform 0.2s ease;
}

#captcha-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

#captcha-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    cursor: grab;
    border: none;
}

.captcha-status {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.captcha-status.pending {
    color: #aaa;
}

.captcha-status.verified {
    color: #4ade80;
}

.captcha-status.failed {
    color: #ff6b6b;
}

/* Dynamic Loss Indicator */
#loss-indicator {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    font-family: 'Estrangelo Edessa', sans-serif;
    font-size: 0.6rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 1001;
    pointer-events: none;
    text-transform: lowercase;
    letter-spacing: 1px;
}