body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* border-bottom: 2px solid #333; */
    padding-bottom: 10px;
}

header h1 a {
    text-decoration: none;
    color: #333;
}

nav a {
    margin-left: 10px;
    text-decoration: none;
    color: #333;
}

.kata-list {
    list-style: none;
    padding: 0;
}

.kata-item {
    border: 2px solid #333;
    padding: 15px;
    margin-bottom: 15px;
}

.kata-item h3 {
    margin-top: 0;
}

.kata-item .meta {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4em; /* Adjust line height for better spacing */
}

.topic {
    /* Removed pill styling */
    /* margin-right: 5px;
    display: inline-block;
    vertical-align: middle; */
}

.kata-item .meta .topic {
    font-size: 0.9em; /* Slightly larger for better readability in meta */
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    border: 1px solid #333;
    padding: 5px 10px;
}

.pagination .current {
    font-weight: bold;
    background-color: #333;
    color: #f5f5f5;
    border: 1px solid #333; /* Added border */
    padding: 5px 10px; /* Added padding */
    margin: 0 5px; /* Added margin to match a tags */
}

.flash {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.flash.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.preview-content {
    border: 1px solid #ddd;
    padding: 15px;
    min-height: 100px;
    background-color: #fff;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 20px;
}

#title {
    width: 100%;
}

#content,
#json_data,
#promptContent, /* Added #promptContent */
#compiledOutput { /* Added #compiledOutput */
    width: 100%;
    min-height: 200px;
    display: block;
}

#promptName { /* New rule for promptName */
    width: 100%;
    display: block;
}

.copy-code-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #333;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8em;
}

.search-container {
    position: relative;
}

#search-input {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    border: 1px solid #333;
    /* border-radius: 5px; */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.autocomplete-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    border: 1px solid #ddd;
    background-color: #fff;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f5f5f5;
}

.autocomplete-header {
    font-weight: bold;
    padding: 10px;
    background-color: #eee;
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 0px;
        display: flex; /* Make nav a flex container */
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: center; /* Center items if they don't fill the line */
    }

    nav a {
        margin: 5px; /* Adjust margin for side-by-side layout */
        /* Removed display: block; as flex items are inline by default */
    }
}

footer {
    text-align: center;
    margin-top: 64px;
    padding-top: 20px;
    border-top: 1px solid #ccc;
    color: #666;
    font-size: 0.9em;
}

/* Custom Margin Utilities (similar to Bootstrap's spacing system) */
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mb-5 { margin-bottom: 48px !important; }

.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mt-5 { margin-top: 48px !important; }