:root {
    /* Color variables */
    --color-primary: #007bff;
    --color-primary-hover: #0056b3;
    --color-success: #28a745;
    --color-success-hover: #218838;
    --color-disabled: #6c757d;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray: #808080;
    --color-light-gray: #f5f5f5;
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-border: #333333;
    --color-shadow: rgba(0, 0, 0, 0.3);

    --width-default: 600px;
}

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

a, a:visited {
    color: #1da1f2;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--color-light-gray);
    min-height: 100vh;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--color-black);
    position: relative;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    line-height: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    line-height: 30px;
}

/* Hide the checkbox */
.menu-toggle {
    display: none;
}

/* Burger menu button */
.burger-menu {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 5px 0;
    position: relative;
}

.header-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-white);
    margin-left: 45px;
    line-height: 30px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right button,
.header-right a {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    line-height: 20px;
    height: 30px;
    box-sizing: border-box;
}

.compose-button {
    background-color: var(--color-primary);
}

.compose-button:hover {
    background-color: var(--color-primary-hover);
}

.login-button:hover {
    background-color: var(--color-primary-hover);
}

.login-button:disabled {
    background-color: var(--color-disabled);
    cursor: not-allowed;
}

.login-button.authenticated {
    background-color: var(--color-success);
}

.login-button.authenticated:hover {
    background-color: var(--color-success-hover);
}

/* Header search form */
.header-search-form {
    flex: 1;
    margin: 0 15px;
    max-width: 400px;
}

.header-search-input {
    width: 100%;
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    background-color: var(--color-white);
    color: var(--color-text-dark);
    box-sizing: border-box;
    line-height: 20px;
}

.header-search-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 0;
}

.header-search-input::placeholder {
    color: var(--color-text-light);
}

@media (max-width: 600px) {
    .login-button {
        display: none;
    }

    .header-search-form {
        display: none;
    }
}

/* Menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: 100vh;
    background-color: var(--color-gray);
    z-index: 999;
    display: none;
    box-shadow: 0 2px 10px var(--color-shadow);
}

.menu-content {
    width: fit-content;
    min-width: 300px;
    background-color: var(--color-black);
    padding: 20px;
    margin: 0;
    height: 100vh;
}

@media (min-width: 1240px) {
    .menu-content {
        margin-left: calc(50vw - 600px);
    }
}

.close-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.close-button span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    position: absolute;
    top: 50%;
    left: 50%;
}

.close-button span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 40px;
    padding-top: 0;
    line-height: 30px;
}

.menu-header-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-white);
    margin-left: 45px;
}

[class$="header-text"] a {
    text-decoration: none;
    color: var(--color-white);
}

.menu-items {
    margin-top: -20px;
    list-style: none;
    border-top: 1px solid var(--color-border);
}

.menu-items a {
    text-decoration: none;
    color: var(--color-white);
    font-size: 18px;
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.menu-items a:hover {
    color: var(--color-primary);
}

.menu-toggle:checked ~ .menu-overlay {
    display: block;
}

.menu-toggle:checked ~ .header .header-left {
    visibility: hidden;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--color-white);
    border-radius: 8px;
}

.main-content h1 {
    color: var(--color-text-dark);
    margin-bottom: 20px;
}

.main-content p {
    color: var(--color-text-light);
    line-height: 1.5;
}

.compose-modal {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-width: var(--width-default);
    width: 90%;
    box-shadow: 0 4px 20px var(--color-shadow);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.compose-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.compose-form {
    display: flex;
    flex-direction: column;
}

.compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.compose-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--color-text-dark);
}

.compose-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-close:hover {
    color: var(--color-text-dark);
}

.compose-body {
    padding: 20px;
}

.compose-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: vertical;
    box-sizing: border-box;
}

.compose-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.compose-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--color-border);
}

.compose-cancel {
    background-color: var(--color-light-gray);
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.compose-cancel:hover {
    background-color: #e0e0e0;
}

.compose-post {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.compose-post:hover {
    background-color: var(--color-primary-hover);
}

.compose-post:disabled {
    background-color: var(--color-disabled);
    cursor: not-allowed;
}

.compose-insert-image {
    background-color: var(--color-light-gray);
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.compose-insert-image:hover {
    background-color: var(--color-border);
}

.compose-reply-context {
    padding: 15px 20px;
    background-color: var(--color-light-gray);
    border-bottom: 1px solid var(--color-border);
}

.reply-to-label {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.reply-to-label span {
    font-weight: 600;
    color: var(--color-primary);
}

.reply-to-content {
    font-size: 14px;
    color: var(--color-text-dark);
    padding: 8px 12px;
    background-color: var(--color-white);
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
    word-wrap: break-word;
}

@media (max-width: 600px) {
    .compose-modal {
        max-width: 95%;
    }

    .compose-header {
        padding: 15px;
    }

    .compose-body {
        padding: 15px;
    }

    .compose-footer {
        padding: 15px;
    }

    .compose-reply-context {
        padding: 12px 15px;
    }
}

/* Flash notification system */
#flash-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.flash-notification {
    background: rgba(29, 155, 240, 0.95);
    color: var(--color-white);
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease-out;
    pointer-events: auto;
    max-width: 300px;
}

.flash-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.flash-notification.hide {
    opacity: 0;
    transform: translateX(100px);
}

