* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #ae77ee;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: #181028;
}

h1, h2, h3 {
    text-shadow: 2px 2px 5px #620808;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
}

.notes-list {
    display: grid;
    gap: 15px;
}

.note-card {
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.note-card h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid #ecf0f1;
    padding-top: 10px;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.note-form {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        text-align: center;
    }

    header .btn {
        margin-top: 10px;
    }

    .notes-list {
        grid-template-columns: 1fr;
    }
}

textarea {
    width: 100%;
    word-wrap: break-word;  /* Wrap long words */
    white-space: pre-wrap;  /* Preserve formatting while wrapping */
    overflow-wrap: break-word;  /* Ensure long words break */
    resize: vertical;  /* Allow vertical resizing */
    line-height: 1.5;  /* Improve readability */
    padding: 10px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    textarea {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
}

button {
    font-family: monospace;
    border: 0;
    background-color: inherit;

    border: 1px solid;
    cursor: pointer;
    padding: 8px;
    margin-top: 0.1em;
}

input, textarea {
    background-color: inherit;
    border: 1px solid;
    padding: 0.5em;
    font-size: 18px;
}


.drafts-header,
.posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.draft,
.post {
    display: flex;
    border: 1px dashed;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-direction: column;
}

.draft-title,
.post-title {
    word-break: break-word;
    margin-bottom: 10px;
    font-weight: bold;
    max-width: 86%;
}

 .actions
 {
    display: flex;
    gap: 10px;
}

 .actions a,
.actions button
 {
    flex-grow: 1;
    gap: 10px;
    display: block;
    width: 100%;
    height: 100%;
    padding: 6px;
    text-align: center;
    text-decoration: none;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0px;
}

.actions button {

    height: auto;
}

.draft .actions form,
.post .actions form {
    width: 100%;
}

/* Optional: Add some subtle differences for posts */
.post {
    border-style: solid; /* Solid border for posts vs dashed for drafts */
}

/* Optional: Directory styling */
.directory-section {
    margin-bottom: 20px;
}

.directory-section h3 {
    border-bottom: 1px solid;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

select {
  background-color: inherit;
  border: 1px solid;
  padding: 5px;
}

pre {
  background-color: #040204;  /* Use hex for dark blue */
  color: #e6d5d5;
  display: block;
  font-family: monospace;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;  /* Smooth scrolling on iOS */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

code {
  background-color: #040204;  /* Use hex for dark blue */
  color: #e6d5d5;
  /*display: block;*/
  line-height: 1.5;
  font-family: monospace;
}

pre code {
  color: white;
}
