@font-face {
    font-family: 'MR ROBOT';
    src: url('/font/MR ROBOT.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Miriam Libre';
    src: url('/font/MiriamLibre-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* FSOCIETY COLORS */
:root {
    --rojo: #DF2D2F;
    --bittersweet-shimmer: #C14953;
    --space-cadet: #2A2E45;
    --licorice: #0B0014;
    --isabelline: #F6F0ED;
}

* {
    box-sizing: border-box;
}

img {
    -webkit-user-drag: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Miriam Libre', 'Helvetica Neue', Arial, sans-serif;
    background: var(--licorice);
    color: var(--rojo);
    overflow: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Main content area - don't stretch, just take natural height */
body > *:not(.site-footer):not(.background-gif) {
    flex: 0 0 auto;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(90, 169, 230, 0.03) 2px,
            rgba(90, 169, 230, 0.03) 4px
        );
    pointer-events: none;
    z-index: 0;
}

.background-gif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    opacity: 0.15;
    filter: hue-rotate(200deg) saturate(1.5) contrast(1.2);
}

.logo-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    z-index: 1;
    position: relative;
    text-shadow: 0 0 10px var(--rojo), 0 0 20px var(--rojo), 0 0 30px var(--rojo);
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from { 
        text-shadow: 0 0 10px var(--rojo), 0 0 20px var(--rojo), 0 0 30px var(--rojo);
        opacity: 0.9;
    }
    to { 
        text-shadow: 0 0 20px var(--rojo), 0 0 30px var(--rojo), 0 0 40px var(--rojo);
        opacity: 1;
    }
}

.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5vh;
    padding: 30px;
    border: 2px solid var(--bittersweet-shimmer);
    background: rgba(11, 0, 20, 0.85);
    box-shadow: 0 0 30px rgba(193, 73, 83, 0.3), inset 0 0 50px rgba(11, 0, 20, 0.8);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    animation: containerFadeIn 1s ease forwards;
}

@keyframes containerFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95);
        border-color: transparent;
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        border-color: var(--bittersweet-shimmer);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInTop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
    width: 100%;
    justify-items: center;
}

button.answer-btn {
    border: 2px solid var(--space-cadet);
    background: rgba(11, 0, 20, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

button.answer-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(193, 73, 83, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

button.answer-btn:hover {
    transform: translateY(-5px);
    border-color: var(--bittersweet-shimmer);
    box-shadow: 0 0 20px rgba(193, 73, 83, 0.4);
}

button.answer-btn:hover::before {
    opacity: 1;
}

.answer-btn img {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 4px;
    display: block;
    transition: filter 0.3s ease;
    filter: none;
    object-fit: contain;
    position: relative;
    z-index: 0;
}

button.answer-btn:hover img {
    filter: none;
}

.quiz-container > img {
    max-width: 100%;
    max-height: 40vh;
    width: auto;
    height: auto;
    border: 2px solid var(--space-cadet);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(193, 73, 83, 0.2);
    margin-top: 10px;
    object-fit: contain;
    background: rgba(11, 0, 20, 0.8);
}

.correct {
    outline: 3px solid #00ff00 !important;
    box-shadow: 0 0 30px #00ff00aa !important;
    filter: brightness(1.2) !important;
    border-color: #00ff00 !important;
}

.incorrect {
    outline: 3px solid var(--rojo) !important;
    box-shadow: 0 0 30px rgba(223, 45, 47, 0.6) !important;
    filter: brightness(0.8) !important;
    border-color: var(--rojo) !important;
}

.answer-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: none;
}

.next-question-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background: rgba(11, 0, 20, 0.8);
    color: var(--isabelline);
    border: 2px solid var(--isabelline);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(246, 240, 237, 0.3);
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    position: relative;
    z-index: 1002;
}

.next-question-btn:hover {
    border-color: var(--bittersweet-shimmer);
    color: var(--isabelline);
    box-shadow: 0 0 20px var(--bittersweet-shimmer);
    transform: translateY(-2px);
    text-decoration: none;
}

.next-question-btn:active {
    transform: translateY(0);
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}


#stats-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    color: var(--rojo);
    padding: 20px 30px;
    border: 2px solid var(--rojo);
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(223, 45, 47, 0.4);
    z-index: 1000;
    font-family: 'Courier New', monospace;
    max-width: 280px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#stats-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

#stats-panel h3 {
    margin: 0 0 15px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rojo);
    text-shadow: 0 0 10px var(--rojo);
}

#stats-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

#stats-panel li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

#stats-panel li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--rojo);
    font-weight: bold;
}

#stats-toggle.rotated {
    transform: rotate(180deg);
}

#logout-form {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    animation: fadeInTop 1s ease forwards;
}

.logout-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background: rgba(11, 0, 20, 0.8);
    color: var(--isabelline);
    border: 2px solid var(--isabelline);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none; 
    display: block; 
    margin-bottom: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(246, 240, 237, 0.3);
    width: fit-content;
    box-sizing: border-box;
}

.logout-btn:hover {
    border-color: var(--bittersweet-shimmer);
    color: var(--isabelline);
    box-shadow: 0 0 20px var(--bittersweet-shimmer);
    transform: translateY(-2px);
    text-decoration: none;
}


.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(11, 0, 20, 0.95);
    border: 2px solid var(--bittersweet-shimmer);
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(193, 73, 83, 0.4);
    color: var(--bittersweet-shimmer);
    animation: fadeIn 0.8s ease forwards;
}

.form-box {
    display: flex;
    flex-direction: column;
}

.input-field {
    padding: 12px;
    margin-bottom: 20px;
    background: rgba(11, 0, 20, 0.8);
    border: 2px solid var(--space-cadet);
    border-radius: 4px;
    color: var(--isabelline);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.input-field:hover {
    border-color: var(--bittersweet-shimmer);
    color: var(--isabelline);
    box-shadow: 0 0 15px var(--bittersweet-shimmer);
}

.input-field:focus {
    border-color: var(--bittersweet-shimmer);
    outline: none;
    background: rgba(11, 0, 20, 0.9);
    box-shadow: 0 0 15px var(--bittersweet-shimmer);
    color: var(--isabelline);
}

.button-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.main-btn {
    flex: 1;
    padding: 12px;
    background: rgba(11, 0, 20, 0.8);
    border: 2px solid var(--isabelline);
    border-radius: 4px;
    color: var(--isabelline);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.main-btn:hover {
    border-color: var(--bittersweet-shimmer);
    color: var(--isabelline);
    box-shadow: 0 0 20px var(--bittersweet-shimmer);
}

.secondary-btn {
    flex: 1;
    padding: 12px;
    background: rgba(11, 0, 20, 0.8);
    border: 2px solid var(--isabelline);
    border-radius: 4px;
    color: var(--isabelline);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.secondary-btn:hover {
    border-color: var(--bittersweet-shimmer);
    color: var(--isabelline);
    box-shadow: 0 0 20px var(--bittersweet-shimmer);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.error-message {
    color: var(--rojo);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px var(--rojo);
}

/* Containers - ensure they expand to push footer down */
.exams-container,
.login-container,
.cheater-container,
.quiz-container {
    flex: 1;
}

/* Footer Styles */
.site-footer {
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: rgba(11, 0, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    margin-top: 40px;
    border-top: 2px solid var(--bittersweet-shimmer);
    direction: rtl;
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 -2px 20px rgba(193, 73, 83, 0.3);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
}

.footer-text {
    margin: 0;
    font-size: 14px;
    color: var(--isabelline);
    line-height: 1.5;
    text-align: center;
    display: inline-block;
    font-family: 'Miriam Libre', 'Helvetica Neue', Arial, sans-serif;
}

/* Support for old footer format (just <p>) */
.site-footer > p {
    margin: 0 auto;
    font-size: 14px;
    color: var(--isabelline);
    line-height: 1.5;
    text-align: center;
    display: inline-block;
    width: auto;
    font-family: 'Miriam Libre', 'Helvetica Neue', Arial, sans-serif;
}

/* Links in footer - ensure they're styled correctly */
.site-footer a,
.site-footer > p a,
.footer-text a {
    color: var(--rojo) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
    font-weight: bold;
}

.site-footer a:hover,
.site-footer > p a:hover,
.footer-text a:hover {
    color: var(--bittersweet-shimmer) !important;
    text-shadow: 0 0 10px var(--bittersweet-shimmer);
}

.site-footer a:visited,
.site-footer > p a:visited,
.footer-text a:visited {
    color: var(--rojo) !important;
}

.footer-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-icon {
    color: var(--rojo);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.footer-icon:hover {
    color: var(--bittersweet-shimmer);
    background-color: rgba(193, 73, 83, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(193, 73, 83, 0.3);
}

.footer-icon svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
}

/* SVG icons in footer */
.footer-text svg,
.site-footer > p svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    display: inline-block;
}


