*, *::before, *::after {
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

:root {
    --header-height: 60px;
    --footer-height: 80px;
    --primary-bg: #333;
    --secondary-bg: #444;
    --text-color: white;
    --accent-color: white;
    --border-color: #555;
    --font-base: clamp(14px, 1.2vw, 18px);
    --spacing-base: clamp(10px, 2vh, 20px);
    --btn-padding: clamp(5px, 1vh, 10px) clamp(10px, 1vw, 15px);
}

.image-vignette {
    margin: var(--spacing-base) 0;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-bg);
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
}

.vignette-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.vignette-link:hover {
    opacity: 0.9;
}

.image-vignette img, .image-vignette video {
    display: block;
    margin: 10px auto 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px;
}

.username {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

/* General styles */
body {
    font-family: "Liberation Sans", Arial, Helvetica, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: var(--font-base);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--primary-bg);
    height: var(--header-height);
    flex-shrink: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.main-container {
    padding: var(--spacing-base);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex-grow: 1;
    box-sizing: border-box;
    overflow-y: auto;
}

#dynamic-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
    overflow: hidden;
}

a {
    color: white;
    font-weight: bold;
    /*cursor: pointer;*/
}

a:hover {
    text-decoration: none;
}

a:active {
    text-decoration: underline;
}

header h1 a {
    /*color: white;*/
    text-decoration: none;
    /*cursor: pointer;*/
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
    /*font-weight: bold;*/
}

.btn, button {
    padding: var(--btn-padding);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    color: var(--accent-color);
    font-size: 1em;
    font-weight: bold;
    background: none;
    overflow: hidden;
    white-space: nowrap;
}

.btn:hover, button:hover {
    background-color: #fff3;
}

.btn:active, button:active {
    background-color: white;
    color: var(--primary-bg);
}

.btn:disabled, button:disabled {
    border: 2px solid #fff9;
    color: #fff9;
    cursor: not-allowed;
}

.character-counter {
    font-size: 0.8em;
    text-align: right;
    margin-top: -10px;
    margin-bottom: 10px;
    color: #888;
}

.character-counter.limit-exceeded {
    color: #ff4444;
    font-weight: bold;
}

.btn:disabled:active, button:disabled:active {
    background-color: transparent;
}

.logout, .danger {
    color: #f66;
    border: 2px solid #f66;
}

.logout:hover, .danger:hover {
    background-color: #f003;
}

.logout:active, .danger:active {
    background-color: #f66;
    color: white;
}

/*.danger-zone {*/
/*    margin-top: 50px;*/
/*    border-top: 1px solid #f665;*/
/*    padding-top: 20px;*/
/*    width: 100%;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    align-items: center;*/
/*}*/

/* Flash Messages */
.flash-message {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: -400px;
    margin-left: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    width: auto;
    max-width: 90vw;
    box-sizing: border-box;
    text-align: left;
    z-index: 9999;
    transition: transform 0.5s ease-out;
}

.flash-message.show {
    transform: translateX(calc(400px + 20px));
}

.flash-success {
    color: #3e3;
    border: 1px solid #3e36;
    background-color: #3e33;
}

.flash-error {
    color: #f33;
    border: 1px solid #f336;
    background-color: #f333;
}

.actions {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #ccc;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.action-icon path {
    transition: fill 0.2s, stroke 0.2s;
    fill: transparent !important;
    stroke: white;
    stroke-width: 0.53;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-item:hover .action-icon path {
    fill: #fff3 !important;
}

.action-item:active .action-icon path {
    fill: #fff6 !important;
}

.like-container.liked .like-icon path {
    fill: white !important;
}


footer {
    background-color: var(--primary-bg);
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
    width: 100%;
    height: var(--footer-height);
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    flex-shrink: 0;
    z-index: 1000;
}

.footer-content {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 0.8em;
}

@media (max-width: 600px) {
    header, footer {
        padding: 0 10px;
    }

    header h1 {
        font-size: 1.2em;
    }

    nav {
        gap: 10px;
    }

}
