/* Google Font: VT323 (Pixel-like) */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg-color: #ffffff;
    /* Paper White */
    --text-color: #000000;
    /* Ink Black */
    --border-color: #000000;
    --dim-color: #888888;
    /* Pencil Grey */
    --font-stack: 'VT323', monospace;
    --font-size-base: 20px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    font-size: var(--font-size-base);
    margin: 0;
    padding: 20px;
    line-height: 1.4;
    /* Dotted background effect for "paper" feel */
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 20px 20px;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-color);
    border: 3px solid var(--border-color);
    padding: 20px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    text-transform: uppercase;
    font-weight: 400;
}

.status-indicator {
    font-size: 1.2rem;
    padding: 2px 8px;
    border: 2px solid var(--text-color);
    background: #fff;
}

.status-indicator.online {
    background: #000;
    color: #fff;
}

.input-area {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input,
textarea {
    background: #fff;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    font-family: inherit;
    padding: 10px;
    font-size: 1.2rem;
    border-radius: 0;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

button {
    background: #fff;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    font-family: inherit;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 1.2rem;
    transition: all 0.1s;
}

button:hover {
    background: #000;
    color: #fff;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

button:active {
    box-shadow: none;
    transform: translate(2px, 2px);
}

/* Poll Creator Styles */
.poll-controls {
    display: flex;
    justify-content: flex-end;
}

#poll-creator {
    border: 1px dotted var(--text-color);
    padding: 10px;
    background: #fdfdfd;
}

#poll-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.secondary-btn {
    font-size: 1rem;
    padding: 5px 10px;
}

.small-btn {
    font-size: 1rem;
    padding: 5px 10px;
    width: 100%;
    border-style: dotted;
}

/* Auth Styles */
.text-btn {
    border: none;
    background: none;
    padding: 0;
    margin-left: 10px;
    text-decoration: underline;
    font-size: 1rem;
}

.text-btn:hover {
    background: none;
    color: var(--dim-color);
    box-shadow: none;
}

.error-msg {
    color: var(--text-color);
    background: #000;
    /* White text on black bg for errors */
    color: #fff;
    font-size: 1rem;
    padding: 2px 5px;
    display: inline-block;
    margin-top: 10px;
}

/* Feed Styles */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.note {
    border: 2px solid var(--text-color);
    padding: 15px;
    background: #fff;
    box-shadow: 5px 5px 0px #ddd;
}

.note-meta {
    font-size: 1rem;
    border-bottom: 1px dotted var(--text-color);
    padding-bottom: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.user-id {
    font-weight: bold;
}

.timestamp {
    color: var(--dim-color);
}

.note-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.note-actions {
    border-top: 1px dotted var(--dim-color);
    padding-top: 10px;
    display: flex;
    justify-content: flex-start;
}

.vote-btn {
    padding: 5px 10px;
    font-size: 1rem;
    border: 1px solid var(--text-color);
    background: transparent;
    box-shadow: 2px 2px 0px #ccc;
}

.vote-btn:hover {
    background: #eee;
    color: #000;
    box-shadow: 2px 2px 0px #aaa;
}

.vote-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #aaa;
}

/* Poll Display Styles */
.poll-display {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option-btn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    border: 1px solid var(--text-color);
    background: #fff;
    padding: 8px 12px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.poll-option-btn:hover {
    background: #f0f0f0;
    box-shadow: 2px 2px 0px #ccc;
}

.poll-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #ddd;
    z-index: -1;
    opacity: 0.5;
    transition: width 0.3s ease;
}

footer {
    margin-top: auto;
    padding-top: 20px;
    font-size: 1rem;
    color: var(--dim-color);
    text-align: center;
    border-top: 1px dotted var(--dim-color);
}