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

html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #fafafa !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto !important;
    padding: 0;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

nav {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

nav .nav-left {
    display: flex;
    align-items: center;
}

nav .nav-left a {
    font-weight: 600;
    color: #333;
}

nav .nav-center {
    display: flex;
    align-items: center;
}

nav .nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

nav .nav-right a {
    font-size: 0.85em;
    padding: 6px 12px;
    border-radius: 4px;
    background: transparent;
}

nav .nav-right a:hover {
    background: #f5f5f5;
    border-bottom-color: transparent;
}

nav a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
    color: #d4859a;
    border-bottom-color: #d4859a;
}

h1 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

main h2 {
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

main h2:first-child {
    margin-top: 0;
}

.track-card h2 {
    font-size: 1.2em;
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    font-weight: 500;
}

.description h2 {
    font-size: 1.3em;
    margin: 20px 0 10px 0;
    padding: 0;
    border: none;
}

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.track-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: box-shadow 0.2s ease;
}

.track-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.track-card h2 {
    font-size: 1.2em;
}

audio {
    width: 100%;
    margin: 15px 0 10px 0;
}

a {
    color: #d4859a;
    text-decoration: none;
}

a:hover {
    color: #b87a8e;
}

form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin: 15px 0;
}

form label {
    display: block;
    margin-bottom: 12px;
    color: #444;
    font-size: 0.9em;
}

form input, form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    font-family: inherit;
    font-size: 0.95em;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: #d4859a;
    background: #fff;
}

form button {
    background: #d4859a;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95em;
    margin-top: 15px;
    transition: background 0.2s ease;
}

form button:hover {
    background: #c77a8e;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: #f5f5f5;
    color: #555;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

td {
    border-bottom: 1px solid #eee;
}

.dashboard-nav {
    text-align: center;
    margin: 20px 0;
}

.dashboard-nav a {
    display: inline-block;
    background: #fff;
    padding: 8px 16px;
    margin: 4px;
    border-radius: 6px;
    border: 1px solid #eee;
    color: #666;
    font-size: 0.9em;
}

.dashboard-nav a:hover {
    border-color: #d4859a;
    color: #d4859a;
}

.error {
    color: #c17a8f;
    background: #fff5f5;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 3px solid #c17a8f;
}

.success {
    color: #5a9a5a;
    background: #f5fff5;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 3px solid #5a9a5a;
}

footer {
    text-align: center;
    margin-top: auto;
    padding-top: 40px;
    color: #999;
    font-size: 0.85em;
}

.teaser {
    color: #666;
    margin-bottom: 15px;
}

.description {
    margin: 20px 0;
    line-height: 1.7;
}

.reactions {
    margin-top: 30px;
}

.reaction {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    border-left: 3px solid #eee;
}

.reaction .author {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 5px;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: #d4859a;
}

.add-reaction {
    margin-top: 30px;
}

.add-reaction h3 {
    color: #444;
    margin-bottom: 15px;
    font-weight: 500;
}

fieldset {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

fieldset legend {
    color: #666;
    font-size: 0.9em;
    padding: 0 8px;
}

.button {
    display: inline-block;
    background: #d4859a;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
}

.EasyMDEContainer {
    margin-top: 8px;
}

.EasyMDEContainer .CodeMirror {
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 200px;
}

.EasyMDEContainer .editor-toolbar {
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.EasyMDEContainer .editor-toolbar button {
    color: #555;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
    background: #f5f5f5;
    border-color: #d4859a;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #c77a8e;
    color: white;
    padding: 25px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    min-height: 100px;
    justify-content: center;
}

.theme-card:hover {
    background: #d4859a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 133, 154, 0.5);
}

.theme-card:hover .theme-name,
.theme-card:hover .theme-count {
    color: #333;
}

.theme-name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.theme-count {
    font-size: 0.85em;
    opacity: 0.85;
    text-align: center;
}
