/* * NeoCity Guestbook Stylesheet
 * Theme: Monospace (Retro/Terminal Look)
 * FEATURE: Fixed to Top-Right Corner & Scrollable Message Area
 */

/* --- GLOBAL STYLES --- */

body {
  cursor: url('howl.png') 0 0, auto;
    font-family: 'Courier New', Courier, monospace;
    background-color: #1e1e1e;
    color: #e0e0e0;
    margin: 20px;
    line-height: 1.5;
}

h2, h3, h4 {
    font-family: inherit;
    color: #00ff00;
}

/* --- MESSAGE BOARD STYLES --- */

/* Main Container: The entire window (Form + Messages) */
#message-board {
    /* --- POSITIONING TO TOP-RIGHT CORNER --- */
    position: fixed; /* Keeps the board visible even when the user scrolls the main page */
    top: 20px;       /* 20px margin from the top edge */
    right: 20px;     /* 20px margin from the right edge */
    z-index: 1000;   /* Ensures the board sits on top of other content */
    
    /* --- APPEARANCE --- */
    width: 350px;    /* Use a fixed width for a good sidebar look */
    max-width: 90%;  /* Ensures it works on very small screens */
    background-color: #2b2b2b;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
}

/* Heading Style */
#message-board h2 {
    color: #00ff00;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.5em; /* Slightly smaller heading for a compact window */
    text-shadow: 0 0 5px #00ff00;
}

/* Form Styling: Input area for new messages */
#message-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px; /* Reduced margin */
    padding: 10px; /* Reduced padding */
    border: 1px solid #00ff00;
    border-radius: 4px;
    background-color: #383838;
}

/* Textarea Input */
#message-input {
    font-family: inherit;
    padding: 8px; /* Reduced padding */
    margin-bottom: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px; /* Reduced height */
    font-size: 0.9em;
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* Submit Button */
#submit-btn {
    font-family: inherit;
    padding: 8px 12px;
    background-color: #00cc00;
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s, transform 0.1s;
}

#submit-btn:hover {
    background-color: #00ff00;
    color: #1e1e1e;
}

#submit-btn:active {
    transform: scale(0.99);
}

/* Container for all messages (SCROLLABLE FRAME) */
#messages-container {
    /* --- SCROLLBAR AND FRAME --- */
    max-height: 300px; /* **KEY:** Sets the fixed height of the message display area */
    overflow-y: auto;  /* **KEY:** Adds a vertical scrollbar when content overflows */
    
    /* Frame Styling */
    border: 1px solid #00ff00;
    background-color: #1a1a1a;
    padding: 10px;
    border-radius: 2px;
}

/* Message Display Styling: Individual posts */
.message-post {
    background-color: #1e1e1e;
    border: 1px dashed #00ff00;
    padding: 10px; /* Reduced padding */
    margin-bottom: 8px; 
    border-radius: 0;
    transition: box-shadow 0.2s;
}

.message-post:hover {
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

/* Header (Author Code and Timestamp) */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em; /* Reduced size */
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px dotted #444;
}

/* Author Code (Name) */
.message-author {
    font-weight: bold;
    color: #00ffcc;
}

/* Timestamp */
.message-time {
    color: #999;
}

/* The actual message text */
.message-text {
    white-space: pre-wrap;
    color: #e0e0e0;
    margin-top: 0;
    line-height: 1.4;
    font-size: 0.95em;
}

/* Optional: Style the scrollbar (WebKit only) */
#messages-container::-webkit-scrollbar {
    width: 6px; /* Thinner scrollbar */
}
#messages-container::-webkit-scrollbar-thumb {
    background-color: #008800;
    border-radius: 3px;
}
#messages-container::-webkit-scrollbar-track {
    background-color: #222;
}