body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

h1,
h2 {
    color: #333;
}

/* Header mit Flexbox - Responsive */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    flex: 0 0 auto;
}

.page-header .header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.page-header .username-display {
    width: 100%;
    text-align: right;
    font-size: 0.85em;
    color: #666;
    margin-top: -10px;
}

/* Mobile: Zentriert */
@media (max-width: 600px) {
    .page-header {
        justify-content: center;
        text-align: center;
    }

    .page-header h1 {
        width: 100%;
    }

    .page-header .header-buttons {
        justify-content: center;
    }

    .page-header .username-display {
        text-align: center;
    }
}

.post {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.replies-container {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background: #f9f9f9;
}

.reply {
    margin-bottom: 10px;
    padding: 10px;
    border-left: 3px solid #ccc;
    background: white;
}

.reply-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.post h2 a {
    text-decoration: none;
    color: #0066cc;
}

.post-author {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.post-actions {
    margin-top: 10px;
}

.post-actions a:not(.icon-btn),
.post-actions button:not(.icon-btn) {
    margin-right: 10px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
    line-height: 1.2;
    font-size: inherit;
    border: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
    vertical-align: middle;
}

small {
    color: #666;
}

.back-button {
    background: #ccc;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 20px;
    margin-top: 20px;
}

.back-button:hover {
    background: #bbb;
}

input[type="submit"] {
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

.content-container {
    border: 1px solid #ccc;
    margin-top: 10px;
}

.content-header {
    padding: 5px 10px;
    border-bottom: 1px solid #ccc;
}

.content-header label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
}

.html-buttons {
    display: inline-block;
    vertical-align: top;
}

.html-buttons button {
    margin-left: 5px;
    padding: 3px 6px;
    background: #ddd;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
}

.html-buttons button:hover {
    background: #ccc;
}

#content {
    padding: 10px;
    min-height: 100px;
    margin: 0;
    border: none;
    overflow: hidden;
}

.preview-container {
    border: 1px solid #ccc;
    background: #f9f9f9;
    margin-top: 10px;
}

.preview-header {
    padding: 5px 10px;
    border-bottom: 1px solid #ccc;
}

.preview-header label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
}

.preview-header button {
    padding: 3px 6px;
    background: #ddd;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
}

.preview-header button:hover {
    background: #ccc;
}

#preview {
    padding: 10px;
    min-height: 100px;
}

.pgn-panel {
    display: none;
    border: 1px solid #ccc;
    margin-top: 5px;
    padding: 10px;
    background: #f9f9f9;
}

.pgn-panel textarea {
    height: 80px;
}

.pgn-panel input[type="file"] {
    margin-bottom: 10px;
}

.pgn-panel button {
    padding: 5px 10px;
    margin-right: 10px;
    background: #ddd;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

.pgn-panel button:hover {
    background: #ccc;
}

button.action-btn {
    padding: 10px;
    border: none;
    border-radius: 3px;
    margin-right: 10px;
    cursor: pointer;
    font-size: inherit;
    background: #ccc;
    color: #333;
}

button.action-btn:hover {
    background: #bbb;
}

input[type="text"][name="input"] {
    text-transform: uppercase;
}

@media (max-width: 600px) {
    body {
        padding: 5px;
    }

    .post {
        padding: 10px;
    }

    .replies-container {
        padding: 10px;
    }

    .post-actions a:not(.icon-btn),
    .post-actions button:not(.icon-btn) {
        display: block;
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
}

@media (min-width: 601px) {
    .post-actions {
        display: flex;
        gap: 10px;
    }
}

/* Icon Button Styles */
.icon-btn {
    padding: 5px 8px;
    font-size: 1em;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    line-height: 1.2;
    margin-right: 5px;
}

.icon-btn-edit {
    background: #e0e0e0;
    color: #d32f2f;
    border-color: #ccc;
}

.icon-btn-edit:hover {
    background: #d0d0d0;
}

.icon-btn-action {
    background: #e0e0e0;
    color: #666;
    border-color: #ccc;
}

.icon-btn-action:hover {
    background: #d0d0d0;
}

.icon-btn-delete {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.icon-btn-delete:hover {
    background: #d32f2f;
}

/* Create Post Button */
.create-post-btn {
    background: #4CAF50;
    color: white;
    padding: 8px 15px;
    font-size: 1em;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid #4CAF50;
    margin-bottom: 20px;
    margin-right: 10px;
}

.create-post-btn:hover {
    background: #45a049;
}

.icon-btn.disabled {
    pointer-events: none;
}

/* Mobile Responsive for Remarks Modal */
@media (max-width: 600px) {
    .remarks-modal-content {
        margin: 5% auto !important;
        width: 95% !important;
        border-radius: 5px !important;
    }

    .remarks-modal-header {
        padding: 15px !important;
    }

    .remarks-modal-header h3 {
        font-size: 1.1em !important;
    }

    .remarks-modal-close {
        font-size: 24px !important;
    }

    .remarks-modal-body {
        padding: 15px !important;
    }

    .remarks-modal-body textarea {
        min-height: 60px !important;
        padding: 8px !important;
    }

    .remarks-modal-footer {
        padding: 15px !important;
        text-align: center !important;
    }

    .remarks-modal .btn {
        padding: 8px 16px !important;
        margin: 5px !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ============================================================================
   TOAST SYSTEM
   ============================================================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    max-width: 350px;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid;
    position: relative;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-success {
    border-left-color: #4CAF50;
    background: #f8fff8;
}

.toast-error {
    border-left-color: #f44336;
    background: #fff8f8;
}

.toast-warning {
    border-left-color: #ff9800;
    background: #fffaf0;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #4CAF50;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-warning .toast-icon {
    color: #ff9800;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #666;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast,
    .toast.hide {
        transform: translateY(100px);
    }
}