/* Base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Ensure content doesn't overflow */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;  /* Smooth scrolling for the anchor links used by e.g. reply button */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
    min-width: 0;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.main-content, .sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Form elements */
.form-control, input, textarea, select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Content handling */
.item-content {
    white-space: pre-line;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}
