:root {
    --accent-color: #db384f;
    --accent-rgb: 219, 56, 79;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background-color: #0a0a0a;
    color: var(--accent-color);
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CRT Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Terminal Container */
.terminal {
    background: rgba(10, 10, 10, 0.95);
    border: 3px solid var(--accent-color);
    border-radius: 2px;
    box-shadow:
        0 0 20px rgba(var(--accent-rgb), 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 90%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Terminal Header */
.terminal-header {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.terminal-title {
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
    display: block;
    margin-bottom: 5px;
}

.terminal-subtitle {
    font-size: 10px;
    opacity: 0.8;
}

/* Cog Menu */
.color-picker-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.cog-btn {
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}

.cog-btn:hover {
    background: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.cog-btn.active {
    background: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8), 0 0 24px rgba(var(--accent-rgb), 0.4);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 1);
}

.cog-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    border: 1px solid var(--accent-color);
    padding: 8px;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3);
    z-index: 2001;
}

.cog-menu.show {
    display: flex;
}

.color-picker-btn {
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 5px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    white-space: nowrap;
}

.color-picker-btn:hover {
    background: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.color-picker-input {
    width: 1px;
    height: 1px;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Terminal Body */
.terminal-body {
    padding: 20px 0;
    min-height: 300px;
}

.image-container {
    margin: 20px 0;
    position: relative;
}

.image-container img {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
    transition: transform 0.3s ease;
}

.image-container img.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.pat-counter {
    font-size: 12px;
    margin: 10px 0 5px 0;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.6);
}

.pat-counter #pat-count {
    font-weight: bold;
    /* Color is set dynamically by JavaScript */
}

.credit {
    font-size: 10px;
    opacity: 0.7;
    display: block;
    margin-top: 10px;
}

.credit a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-color);
}

.credit a:hover {
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.8);
    border-bottom: 1px solid var(--accent-color);
}

.support-message {
    font-size: 12px;
    margin-top: 8px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 1);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    animation: glow 2s ease-in-out infinite;
}

.support-message.show {
    opacity: 1;
    max-height: 30px;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 0 25px rgba(255, 215, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 35px rgba(255, 215, 0, 0.8);
    }
}

/* Status Message */
.status-message {
    margin: 30px 0 20px 0;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5);
}

/* Browser Shame */
.browser-shame {
    margin: 10px 0;
    font-size: 12px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5);
}

.browser-shame.show {
    opacity: 1;
    max-height: 50px;
    margin: 15px 0;
}

.browser-shame .shame-text {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    animation: pulse 1s ease-in-out infinite;
}

/* Menu */
.menu {
    margin-top: 25px;
}

.menu-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

.menu-list {
    list-style: none;
    padding-left: 20px;
}

.menu-list li {
    margin: 12px 0;
    font-size: 14px;
    position: relative;
}

.menu-list li::before {
    content: ">";
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: opacity 0.2s;
}

.menu-list li:hover::before {
    opacity: 1;
}

.bracket {
    color: var(--accent-color);
    opacity: 0.6;
    margin: 0 5px;
}

.menu-list a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s;
    padding: 2px 5px;
}

.menu-list a:hover {
    background: rgba(var(--accent-rgb), 0.1);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}

/* Terminal Footer */
.terminal-footer {
    border-top: 2px solid var(--accent-color);
    padding-top: 15px;
    margin-top: 20px;
    font-size: 14px;
}

.footer-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.6);
    opacity: 0.8;
    z-index: 1;
}

/* Discord Reveal */
.discord-reveal {
    margin-bottom: 10px;
    font-size: 12px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.discord-reveal.show {
    opacity: 1;
    max-height: 50px;
    margin-bottom: 15px;
}

.discord-reveal .highlight {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    font-weight: bold;
}

.discord-reveal .success {
    color: #50C878;
    text-shadow: 0 0 8px rgba(80, 200, 120, 0.6);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Floating Hearts */
.floating-heart {
    position: absolute;
    font-size: 24px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
    pointer-events: none;
    animation: float-up 2s ease-out forwards;
    font-family: 'Share Tech Mono', monospace;
    z-index: 100;
}

.floating-heart.screen-heart {
    position: fixed;
    z-index: 2500;
    font-size: 30px;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-150px) scale(1.5);
        opacity: 0;
    }
}

/* Blinking Cursor Animation */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s infinite;
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.8);
}

/* Links */
a:link, a:visited {
    color: var(--accent-color);
}

/* Password Modal */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.password-modal.show {
    display: flex;
}

.password-content {
    background: rgba(10, 10, 10, 0.95);
    border: 3px solid var(--accent-color);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.5);
}

.password-header {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
}

.password-text {
    font-size: 12px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.password-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: inset 0 0 10px rgba(var(--accent-rgb), 0.2);
}

.password-input:focus {
    outline: none;
    box-shadow:
        inset 0 0 10px rgba(var(--accent-rgb), 0.2),
        0 0 10px rgba(var(--accent-rgb), 0.5);
}

.password-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.password-btn {
    background: rgba(var(--accent-rgb), 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.password-btn:hover {
    background: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.password-error {
    margin-top: 15px;
    text-align: center;
    color: #ff4444;
    font-size: 12px;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-error.show {
    opacity: 1;
    max-height: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal {
        width: 95%;
        padding: 15px;
    }

    .terminal-title {
        font-size: 11px;
    }

    .terminal-subtitle {
        font-size: 8px;
    }

    .menu-title {
        font-size: 14px;
    }

    .menu-list li {
        font-size: 12px;
    }
}

/* Screen Flicker Effect (subtle) */
@keyframes flicker {
    0% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    96% {
        opacity: 0.95;
    }
    97% {
        opacity: 1;
    }
    98% {
        opacity: 0.98;
    }
    100% {
        opacity: 1;
    }
}

.terminal {
    animation: flicker 5s infinite;
}
