/* Font Face */
@font-face {
    font-family: 'Syne Mono';
    src: url('/fonts/SyneMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Workbench';
    src: url('/fonts/Workbench-Regular-VariableFont_BLED,SCAN.ttf') format('truetype');
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #ce9604;
    font-family: 'Syne Mono', 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2 {
    font-family: 'Syne Mono', 'Courier New', Courier, monospace;
    font-weight: normal;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 2px;
}

#main-content .section-title {
    text-align: left;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-logo {
    max-width: 600px;
    width: 100%;
    height: auto;
    filter: none;
}

.subsection-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.content-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.85);
    position: relative;
    z-index: 10;
    filter: url(#rough);
}

/* Section Management */
.section {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: relative;
    z-index: 10;
}

.section.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Code Entry Page */
#code-entry .container {
    text-align: center;
    filter: none;
}

#code-entry .code-input-container,
#code-entry .error-message {
    filter: url(#rough);
}

.logo-container {
    margin-bottom: 3rem;
}

#campaign-logo {
    max-width: 900px;
    width: 90%;
    height: auto;
}

#logo-placeholder {
    height: 200px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ce9604;
}

.code-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.code-boxes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.code-box {
    background-color: #000000;
    border: none;
    border-bottom: 2px solid #ce9604;
    color: #ce9604;
    padding: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 4px;
    width: 80px;
    outline: none;
    font-family: 'Workbench', 'Courier New', Courier, monospace;
    filter: url(#rough);
}

.code-box:focus {
    border-bottom-color: #ce9604;
    box-shadow: 0 0 10px rgba(206, 150, 4, 0.3);
}

.code-separator {
    color: #ce9604;
    font-size: 1.5rem;
    font-family: 'Workbench', 'Courier New', Courier, monospace;
}

/* Buttons */
.action-button,
#code-submit {
    background-color: #000000;
    border: 2px solid #ce9604;
    color: #ce9604;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-family: 'Workbench', 'Courier New', Courier, monospace;
    filter: url(#rough);
}

#code-submit {
    border: none;
}

.action-button:hover,
#code-submit:hover {
    background-color: #ce9604;
    color: #000000;
    box-shadow: 0 0 15px rgba(206, 150, 4, 0.5);
}

.action-button:active,
#code-submit:active {
    transform: scale(0.98);
}

/* Error Messages */
.error-message {
    color: #ce9604;
    margin-top: 1rem;
    text-align: center;
    min-height: 1.5rem;
    font-family: 'Workbench', 'Courier New', Courier, monospace;
}

/* Landing Animation */
#landing-animation {
    background-color: #000000;
    position: relative;
}

.terminal {
    font-family: 'Workbench', 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: #ce9604;
}

#cursor-line {
    display: flex;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Letter Container */
.letter-container {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.letter-container.visible {
    opacity: 1;
}

.letter-image {
    max-width: 75px;
    width: 100%;
    cursor: pointer;
    animation: letterRotate 3s ease-in-out infinite;
}

.letter-image:hover {
    animation-play-state: paused;
}

@keyframes letterRotate {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

/* Main Content Section */
#main-content .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.content-block {
    margin-bottom: 3rem;
}

.content-block.intro {
    margin-bottom: 4rem;
}

.content-list {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.content-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.content-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #ce9604;
}

.content-text.closing {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
}

#continue-btn {
    display: block;
    margin: 3rem auto 0;
    border: none;
}

/* Form Section */
#form-section .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
    filter: none;
}

#form-section .section-title {
    font-size: 2.5rem;
    font-family: 'Workbench', 'Courier New', Courier, monospace;
}

.form-group {
    margin-bottom: 2rem;
}

.form-disclaimer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ce9604;
    text-align: center;
    font-size: 1rem;
    line-height: 1.8;
    color: #ce9604;
    font-style: italic;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    letter-spacing: 1px;
    filter: url(#rough);
}

.form-group input {
    width: 100%;
    background-color: #000000;
    border: none;
    border-bottom: 1px solid #3a3a3a;
    color: #ce9604;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.form-group textarea {
    width: 100%;
    background-color: #000000;
    border: none;
    color: #ce9604;
    padding: 0 0.5rem 0.75rem 0.5rem;
    padding-top: 0;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    background-image: repeating-linear-gradient(
        transparent,
        transparent calc(1.4rem - 1px),
        #3a3a3a calc(1.4rem - 1px),
        #3a3a3a 1.4rem
    );
    background-position: 0 0;
    line-height: 1.4rem;
}

.form-group input:focus {
    border-bottom-color: #ce9604;
}

.form-group textarea:focus {
    outline: none;
}

#coordination-form .action-button {
    display: block;
    margin: 2rem auto 0;
    border: none;
}

/* Confirmation Page */
#confirmation .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
    text-align: center;
}

#confirmation .section-title {
    font-size: 3rem;
}

.confirmation-content {
    margin: 3rem 0;
    text-align: left;
}

.confirmation-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ce9604;
    filter: url(#rough);
}

.confirmation-item:last-child {
    border-bottom: none;
}

.confirmation-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ce9604;
}

.confirmation-value {
    color: #ce9604;
    white-space: pre-wrap;
}

.signature {
    margin-top: 4rem;
    font-style: italic;
}

.signature p {
    margin: 0.5rem 0;
}

/* Text Effects */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.flicker {
    animation: flicker 0.1s ease-in-out;
}

/* Character Portrait */
.character-portrait {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 1;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.character-portrait.visible {
    display: block;
    opacity: 0.3;
}

.character-portrait img {
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Subliminal Flash Image */
.flash-image {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    display: none;
    opacity: 0;
}

.flash-image.active {
    display: block;
    opacity: 0.15;
}

.flash-image img {
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .subsection-title {
        font-size: 1.3rem;
    }

    .container {
        padding: 1.5rem;
    }

    .code-box {
        font-size: 1.2rem;
        width: 60px;
        letter-spacing: 2px;
    }

    .code-separator {
        font-size: 1.2rem;
    }

    .terminal {
        font-size: 1.2rem;
    }

    #campaign-logo {
        max-width: 500px;
    }

    .action-button,
    #code-submit {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .subsection-title {
        font-size: 1.1rem;
    }

    .container {
        padding: 1rem;
    }

    .terminal {
        font-size: 1rem;
    }

    #campaign-logo {
        max-width: 400px;
    }
}
