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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    line-height: 1.6;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    color: #333;
}

.app {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: normal;
    color: #666;
}

.top-links {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
    text-align: right;
}

.links-container {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.subtle-link {
    color: #999;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    /* Remove the margin: 0 0.3rem; since we're using gap */
}

.subtle-link:hover {
    opacity: 1;
}

.separator {
    color: #ccc;
    opacity: 0.5;
}

.goal {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.goal:last-child {
    border-bottom: none;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.goal-title {
    font-size: 1rem;
    font-weight: normal;
}

.goal-description {
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
}

button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-family: monospace;
    padding: 0.25rem 0.5rem;
}

button:hover {
    color: #333;
}

.progress-list {
    margin-top: 1rem;
    padding-left: 1rem;
}

.progress-entry {
    margin-bottom: 1rem;
    position: relative;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.progress-date {
    font-size: 0.8rem;
    color: #999;
    font-family: monospace;
}

.progress-text {
    color: #444;
    font-size: 0.9rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    background: #fff;
    border: 1px solid #eee;
}

.modal-title {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: #666;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

input, textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #eee;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

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

input:focus, textarea:focus {
    outline: none;
    border-color: #666;
}

.modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #ddd;
    }

    .goal {
        border-bottom-color: #333;
    }

    .goal-description, .progress-text {
        color: #999;
    }

    .progress-date {
        color: #666;
    }

    button {
        color: #999;
    }

    button:hover {
        color: #ddd;
    }

    .modal-overlay {
        background: rgba(26, 26, 26, 0.95);
    }

    .modal-content {
        background: #1a1a1a;
        border-color: #333;
    }

    input, textarea {
        background: #1a1a1a;
        border-color: #333;
        color: #ddd;
    }

    input:focus, textarea:focus {
        border-color: #999;
    }
}

/* Add to your existing CSS */
.button-primary {
    background: #fff;
    color: #28a745;
    border: 2px solid #28a745;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.button-primary:hover {
    background: #28a745;
    color: #fff;
}

.button-danger {
    background: #fff;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.button-danger:hover {
    background: #dc3545;
    color: #fff;
}

.button-default {
    background: #fff;
    color: #666;
    border: 2px solid #ccc;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.button-default:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .button-primary {
        background: transparent;
    }

    .button-danger {
        background: transparent;
    }

    .button-default {
        background: transparent;
        color: #999;
        border-color: #666;
    }

    .button-default:hover {
        background: #333;
        color: #fff;
    }
}

/* Markdown styling */
.markdown {
    line-height: 1.6;
    word-wrap: break-word;
}

.markdown ul, 
.markdown ol {
    padding-left: 2em;
    margin: 1em 0;
}

.markdown ul {
    list-style-type: disc;
}

.markdown ul ul {
    list-style-type: circle;
}

.markdown ul ul ul {
    list-style-type: square;
}

.markdown ol {
    list-style-type: decimal;
}

.markdown li {
    margin: 0.5em 0;
}

.markdown p {
    margin: 1em 0;
}

.markdown h1, 
.markdown h2, 
.markdown h3, 
.markdown h4, 
.markdown h5, 
.markdown h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.markdown blockquote {
    padding: 0 1em;
    margin: 1em 0;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
}

.markdown code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
}

.markdown pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
    margin: 1em 0;
}

.markdown pre code {
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.markdown table {
    border-spacing: 0;
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}

.markdown table th,
.markdown table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.markdown table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .markdown blockquote {
        color: #8b949e;
        border-left-color: #30363d;
    }

    .markdown code {
        background-color: rgba(240,246,252,0.15);
    }

    .markdown pre {
        background-color: #161b22;
    }

    .markdown table th,
    .markdown table td {
        border-color: #30363d;
    }

    .markdown table tr {
        background-color: transparent;
        border-color: #30363d;
    }

    .markdown table tr:nth-child(2n) {
        background-color: #161b22;
    }
}

@media (prefers-color-scheme: dark) {
    .subtle-link {
        color: #666;
    }

    .subtle-link:hover {
        color: #888;
    }

    .separator {
        color: #444;
    }
}

@media (max-width: 600px) {
    .top-links {
        top: 0.75rem;
        right: 0.75rem;
    }
}
`;