html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1; /* pushes footer down */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f0f0f0;
    color: #000000;
    margin: 0;
    padding: 0;
}
header, main {
    max-width: 960px;
    margin: auto;
    padding: 20px;
}
header h1 {
    font-size: 2.5em;
    margin-bottom: 0.2em;
}
footer {
    font-size: 0.75em;
}
header p {
    font-size: 1.2em;
}
section {
    margin-bottom: 50px;
}
ul {
    padding-left: 20px;
}

.carousel img {
    max-height: 400px;
    object-fit: contain;
}
.future-section {
    background-color: #e9f7ff;
    padding: 40px 20px;
    border-radius: 10px;
}
.future-section h2 {
    margin-bottom: 20px;
}



:root {
    --fidonet-blue: #0066cc;
    --fidonet-green: #009900;
    --fidonet-dkgreen: #006600;
    --fidonet-red: #cc0000;
    --fidonet-dkred: #770000;
    --fidonet-orange: #ff6600;
    --text-color: #000000;
    --text-color-muted: #6c757d;
    --message-bg: #ffffff;
    --message-quote-bg: #f8f9fa;
    --message-quote-border: #dee2e6;
    --border-color: #dee2e6;
}

.fidonet-kind {
    font-size: 10px;
    padding: 3px 5px;
    border-radius: 5px;
    color:#eee;
    text-transform: uppercase;
}

.fidonet-kind-net {
    background-color: var(--fidonet-red);
}

.fidonet-kind-echo {
    background-color: var(--fidonet-green);
}

.fidonet-kind-admin.fidonet-kind-net {
    background-color: var(--fidonet-dkred) !important;
}

.fidonet-kind-admin.fidonet-kind-echo {
    background-color: var(--fidonet-dkgreen) !important;
}

.btn-fidonet {
    background-color: var(--fidonet-blue);
    border-color: var(--fidonet-blue);
    color: white;
}

.btn-fidonet:hover {
    background-color: #0056b3;
    border-color: #004085;
    color: white;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid var(--fidonet-blue);
    font-weight: 600;
}

.form-control::placeholder {
    color: #6c757d !important; /* matches Bootstrap text-muted */
    opacity: 0.8;
}

.message-item {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    transition: background-color 0.2s;
}

.message-item:hover {
    background-color: #f8f9fa;
}

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

.message-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 4px;
}

.message-new {
    font-weight: bold;
}

.message-from {
    color: var(--text-color);
}

.message-date {
    font-size: 0.875em;
    color: #6c757d;
}

.message-subject {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.message-origin {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
}

.fidonet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Table-based message list styles */
.message-table {
    border: none;
}

.message-table thead th:nth-of-type(1) {
    border-top-left-radius: 10px;
}
.message-table thead th:last-of-type{
    border-top-right-radius: 10px;
}

.message-table thead th {
    background-color: var(--fidonet-blue);
    color: white;
    border: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    vertical-align: middle;

}

.message-table tbody td {
    border-top: 1px solid #eee;
    padding: 12px 8px;
    vertical-align: top;
}

.message-table tfoot td {
    height: 5px;
    background-color: var(--fidonet-blue);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 8px 8px;
    vertical-align: middle;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.message-row {
    transition: background-color 0.2s ease;
}

.message-row:hover {
    background-color: #f8f9fa;
}

/* Override Bootstrap table-hover to preserve text colors */
.table-hover > tbody > tr:hover > * {
    color: inherit !important;
}

.table-hover > tbody > tr:hover {
    background-color: #f8f9fa !important;
}

.message-table .message-new {
    font-weight: 600;
    color: var(--fidonet-blue) !important; 
}

.message-table .message-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.message-table .message-subject {
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.message-table .message-date {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.message-table .echoarea-tag {
    background-color: var(--fidonet-orange);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .message-table thead th {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
    
    .message-table tbody td {
        padding: 8px 4px;
        font-size: 0.875rem;
    }
    
    .message-table .message-subject {
        font-size: 0.875rem;
    }
}

.echoarea-tag {
    background-color: var(--fidonet-green);
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.netmail-indicator {
    background-color: var(--fidonet-red);
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
}

.footer {
    margin-top: auto;
    padding: 20px 0;
    background-color: #e9ecef;
    border-top: 1px solid #dee2e6;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #6c757d;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Kludge lines styling */
.kludge-lines {
    font-family: 'Courier New', monospace;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--kludge-bg);
}

.kludge-lines pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--kludge-text);
    background-color: var(--kludge-bg);
    line-height: 1.3;
}

.message-headers {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.message-headers h6 {
    color: #495057;
    font-weight: 600;
}

#toggleHeaders {
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

#toggleHeaders:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Animation for kludge line toggle */
#kludgeContainer {
    overflow: hidden;
    transition: height 0.3s ease;
}

/* Kludge line color coding legend (for reference in comments)
 * MSGID: #28a745 (Green) - Message ID
 * REPLY: #17a2b8 (Info/Blue) - Reply ID
 * INTL: #ffc107 (Warning/Yellow) - International routing
 * TOPT/FMPT: #fd7e14 (Orange) - To/From points
 * PID: #e83e8c (Pink) - Product ID
 * SEEN-BY: #6f42c1 (Purple) - Seen by nodes
 * PATH: #20c997 (Teal) - Message path
 * Origin: #6c757d (Gray, Italic) - Origin line
 * Tearline: #adb5bd (Light gray) - Tearline
 * Generic: #dc3545 (Red) - Other kludge lines
 * Text: #f8f9fa (Light) - Regular text
 */

/* Echo area management styles */
.echoarea-color-selector {
    border-radius: 4px;
    transition: border-left 0.2s ease;
}

.color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .message-date {
        margin-top: 4px;
    }
    
    .compose-form {
        padding: 15px;
    }
    
    .message-headers {
        padding: 10px;
    }
    
    .kludge-lines pre {
        font-size: 0.8rem;
    }
    
    #toggleHeaders {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/*************************************************/
.message {
    margin: 0;
    padding: 1rem;
    border-radius: 5px;
    background-color: var(--message-bg);
    color: var(--text-color);
}

.message-body {
    margin:0;
    padding: 0;
    font-family: Monaco, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.25;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .message-body {
        font-size: 14px;
        padding: 0.75rem;
        border-radius: 0.25rem;
    }
}

@media (max-width: 576px) {
    .message-body {
        font-size: 13px;
        padding: 0.5rem;
    }
}


#composeDIVbg {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0, 0, 0, 0.7);
}

#composeDIV {
    position: absolute;
    width:95%;
    height:95%;
    top:2.5%;
    left:2.5%;
    background: #fff;
    border-radius: 10px;
    display:flex;
    flex-direction: column;
}

#composeDIV .card-body {
    display:flex;
    flex-direction:column;
    flex:1;
    min-height:0;
}

#composeDIV #body {
    flex:1;
    resize: none;
    min-height: 150px;
    width: 100%;

}