/* === Fonts === */

@font-face {
    font-family: 'Raleway-Black';
    src: url('../fonts/Raleway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* === Base === */

*,
*::before,
*::after {
    margin: 0;
    box-sizing: border-box;
}

body {
    background: url("../img/trianglify.svg") no-repeat fixed center;
    background-size: cover;
    background-color: #0d1117;
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #e3eaf7;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

a {
    color: #2a5db0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    color: rgba(0, 0, 0, 0.6);
}

/* === Layout Containers === */

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    flex: 1;
    color: rgba(0, 0, 0, 0.7);
}

/* === Login Page === */

.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    text-align: center;
    padding: 3rem 4rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.login-card h3 {
    font-family: 'Raleway-Black', sans-serif;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.login-card button {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(to right, #2C5364, #203A43, #0F2027);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Raleway-Black', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
}

.login-card button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.form h3 {
    font-size: 1.8rem;
    color: rgba(0, 0, 0, 0.8);
    text-transform: none;
    text-align: left;
    padding: 0;
    margin-bottom: 0.25rem;
}

.form h4 {
    color: rgba(0, 0, 0, 0.7);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.form h5 {
    color: rgba(0, 0, 0, 0.8);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form p {
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.5rem;
}

.form a {
    color: #2a5db0;
}

.dv {
    font-size: 1.5rem;
}

/* === Impressum / Datenschutz === */

.imp {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    color: rgba(0, 0, 0, 0.7);
    flex: 1;
}

.imp h1, .imp h2, .imp h3 {
    color: rgba(0, 0, 0, 0.85);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: none;
    text-align: left;
    padding: 0;
    font-size: 1.15rem;
}

.imp h1 { font-size: 1.8rem; }
.imp h2 { font-size: 1.4rem; }

.imp p {
    margin-bottom: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

.imp a {
    color: #2a5db0;
}

.imp strong {
    color: rgba(0, 0, 0, 0.8);
}

/* === Form Elements === */

input[type='text'],
input[type='url'] {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    color: rgba(0, 0, 0, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type='text']:focus,
input[type='url']:focus {
    outline: none;
    border-color: #2a5db0;
}

input[type='text']::placeholder,
input[type='url']::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

input[type='color'] {
    width: 48px;
    height: 48px;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

input[type='color']::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type='color']::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type='color']::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

select {
    flex: 1;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    color: rgba(0, 0, 0, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #2a5db0;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    color: rgba(0, 0, 0, 0.8);
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #2a5db0;
}

input[type='checkbox'] {
    margin-right: 8px;
    cursor: pointer;
}

label {
    display: block;
    color: rgba(0, 0, 0, 0.7);
}

.color-type-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* === Buttons === */

.send,
.form > a > button,
.form button[type='submit'] {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #5b8deb, #3a6fd8);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.send:hover,
.form > a > button:hover,
.form button[type='submit']:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(91, 141, 235, 0.3);
}

/* === Status Badges === */

.unprocessed {
    color: #6b7280;
}

.angenommen {
    color: #16a34a;
}

.abgelehnt {
    color: #f04747;
}

.error {
    border: 2px solid #f04747;
    border-radius: 8px;
    padding: 12px;
}

/* === Success / Error Pages === */

.status-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-card {
    text-align: center;
    padding: 3rem 4rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.status-text {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.status-detail {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.6);
}

.status-detail code {
    background-color: rgba(0, 0, 0, 0.07);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === User Page Components === */

.user-info-box {
    background-color: #36393f;
    border-radius: 8px;
    display: flex;
    padding: 20px;
    color: #e3eaf7;
    width: 50%;
    border: 3px solid #0e53dd;
}

.user-reason {
    text-align: center;
}

.dist {
    margin-top: 20px;
}

.accent {
    color: #0e53dd;
    font-weight: bold;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    align-content: center;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    border: 3px solid #0e53dd;
    border-radius: 6px;
    padding: 10px;
}

/* === Case Page Components === */

.big-box {
    background-color: #36393f;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    width: 70%;
    max-width: 1200px;
    border: 3px solid #0e53dd;
}

.box-title {
    font-size: 24px;
    font-weight: bold;
    color: #e3eaf7;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.box-text {
    font-size: 18px;
    color: #e3eaf7;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
}

.divider {
    width: 95%;
    margin: 20px auto;
    height: 4px;
    background-color: #0e53dd;
    border-radius: 2px;
}

.box-url {
    font-size: 18px;
    color: #e3eaf7;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.accept-button, .reject-button, .delete-button, .neutral-button {
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 10px;
    transition: opacity 0.2s;
}

.accept-button:hover, .reject-button:hover, .delete-button:hover, .neutral-button:hover {
    opacity: 0.85;
}

.offset {
    padding: 10px 20px;
}

.accept-button {
    background-color: #43b581;
    color: #e3eaf7;
}

.reject-button {
    background-color: #f04747;
    color: #e3eaf7;
}

.neutral-button {
    background-color: #5b8deb;
    color: #e3eaf7;
}

/* === Reason Page === */

.input-box {
    background-color: #36393f;
    border-radius: 8px;
    padding: 20px;
    margin: 2rem auto;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.input-box .box-title {
    font-size: 24px;
    font-weight: bold;
    color: #e3eaf7;
    margin-bottom: 10px;
}

.reason-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #0e53dd;
    border-radius: 6px;
    background-color: #292b2f;
    color: #e3eaf7;
    resize: vertical;
}

.thread-checkbox {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.thread-checkbox input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.checkbox-label {
    color: #e3eaf7;
    cursor: pointer;
}

.submit-button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #5b8deb;
    color: #e3eaf7;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: #4a7cd4;
}

.warning-ping {
    font-weight: bold;
    text-transform: uppercase;
    margin: 10px;
    color: #991b1b;
}

/* === User Requests List === */

.user-requests {
    margin-top: 20px;
    width: 100%;
}

.request {
    background-color: #36393f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.request-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.request-date, .request-status {
    font-size: 14px;
    color: #e3eaf7;
    margin-bottom: 5px;
}

.request-title {
    font-size: 18px;
    font-weight: bold;
    color: #e3eaf7;
    flex: 1;
    margin-left: 10px;
}

.request-status.angenommen {
    color: #16a34a;
}

.request-status.abgelehnt {
    color: #f04747;
}

.request-status.unprocessed {
    color: #6b7280;
}

.expand-button {
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.request-details {
    display: none;
    padding: 10px;
    background-color: #292b2f;
    color: #e3eaf7;
    border-radius: 6px;
    margin-top: 10px;
}

.expanded .expand-button {
    transform: rotate(45deg);
}

.expanded .request-details {
    display: block;
}

.request-details p {
    margin: 0;
    margin-top: 10px;
}

.request-details a {
    color: #5b8deb;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

/* === Case Page === */

.case-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.case-back {
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    text-decoration: none;
}

.case-back:hover {
    color: #2a5db0;
}

.case-warning {
    background-color: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    padding: 10px 16px;
    color: #991b1b;
    font-weight: 600;
    text-align: center;
}

.case-card {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    color: rgba(0, 0, 0, 0.7);
}

.case-member {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.case-member-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.case-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
}

.case-member-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.85);
    overflow-wrap: anywhere;
}

.case-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 2rem;
    font-size: 0.9rem;
}

.case-meta div {
    overflow-wrap: anywhere;
}

.case-accent {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55);
}

.case-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.85);
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.case-url {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}

.case-url a {
    color: #2a5db0;
}

.case-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.case-content-panel {
    display: flex;
    flex-direction: column;
}

.case-panel-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
}

.case-content-raw,
.case-content-preview {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    flex: 1;
}

.case-content-raw {
    font-family: 'Inter', monospace;
    white-space: pre-wrap;
    color: rgba(0, 0, 0, 0.6);
}

.case-content-preview {
    border-radius: 8px;
}

.case-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.case-status-unprocessed {
    color: #6b7280;
}

.case-status-angenommen {
    color: #16a34a;
}

.case-status-abgelehnt {
    color: #dc2626;
}

@media (max-width: 768px) {
    .case-content-grid {
        grid-template-columns: 1fr;
    }

    .case-meta {
        grid-template-columns: 1fr;
    }

    .case-page {
        margin: 1rem auto;
    }
}

/* === Footer === */

.site-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.45);
    width: 100%;
    margin-top: auto;
}

.site-footer a {
    color: rgba(0, 0, 0, 0.5);
}

.site-footer a:hover {
    color: #2a5db0;
}

.site-footer .footer-nav {
    margin-bottom: 0.5rem;
}

/* === Markdown Editor === */

.md-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.md-toolbar button {
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    line-height: 1;
}

.md-toolbar button svg {
    vertical-align: middle;
}

.md-toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.md-toolbar + textarea {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    background-color: rgba(255, 255, 255, 0.85);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
}

.md-toolbar + textarea:focus {
    border-color: #2a5db0;
}

.md-preview {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    color: rgba(0, 0, 0, 0.75);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 60px;
    overflow-wrap: anywhere;
}

.md-preview em {
    color: rgba(0, 0, 0, 0.35);
}

.md-preview strong {
    color: rgba(0, 0, 0, 0.85);
}

.md-preview h3, .md-preview h4, .md-preview h5 {
    color: rgba(0, 0, 0, 0.85);
    margin: 8px 0 4px;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    text-align: left;
    padding: 0;
}

.md-preview h3 { font-size: 1.3rem; }
.md-preview h4 { font-size: 1.15rem; }
.md-preview h5 { font-size: 1rem; }

.md-preview code {
    background-color: rgba(0, 0, 0, 0.07);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.md-preview pre {
    background-color: rgba(0, 0, 0, 0.07);
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
}

.md-preview pre code {
    background: none;
    padding: 0;
}

.md-preview del {
    color: rgba(0, 0, 0, 0.4);
}

.md-preview blockquote {
    border-left: 3px solid #2a5db0;
    padding-left: 12px;
    margin: 8px 0;
    color: rgba(0, 0, 0, 0.55);
}

.md-preview ul, .md-preview ol {
    margin: 4px 0;
    padding-left: 24px;
}

.md-preview li {
    margin-bottom: 2px;
}

.md-preview sub {
    display: block;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.45);
    line-height: 1.4;
}

.md-preview .md-spoiler {
    background-color: rgba(0, 0, 0, 0.7);
    color: transparent;
    border-radius: 3px;
    padding: 0 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.md-preview .md-spoiler:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.75);
}

.md-label {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.4);
    text-align: right;
    margin-top: 2px;
}

/* === Responsive === */

@media (max-width: 768px) {
    .form, .imp {
        margin: 1rem;
        padding: 1.5rem;
    }

    .user-info-box {
        width: 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        border-width: 2px;
    }

    .user-avatar img {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .big-box {
        width: 100%;
        border-width: 2px;
    }

    .container {
        padding: 1rem;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .accept-button, .reject-button, .delete-button, .submit-button {
        margin: 0;
    }

    .box-title {
        font-size: 20px;
    }

    .box-text, .reason-input {
        width: 100%;
        font-size: 14px;
    }

    .request-title {
        font-size: 16px;
    }

    .request-info {
        align-items: flex-start;
    }

    .request-details {
        padding: 5px;
        font-size: 14px;
    }

    .site-footer {
        margin: 1rem;
        padding: 1rem;
    }
}
