body { font-family: 'Inter', sans-serif; }

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container { max-width: 900px; }

.glass {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background-color: rgba(0, 0, 0, 0.2);
}

.mobile-menu-overlay {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Comments */
.highlight-comment {
    animation: highlightFade 3s ease-out forwards;
    background-color: rgba(99, 102, 241, 0.2);
    border: 1px solid #6366F1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes highlightFade {
    0% {
        background-color: rgba(99, 102, 241, 0.4);
    }
    100% {
        background-color: transparent;
    }
}

/* Spinner for buttons */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 1em;
    height: 1em;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5em;
}

@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* :) */
.nickname {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Mobile comments horizontal scroll styles */
#comments-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    #comments-container {
        overflow-x: auto;
        overflow-y: visible;
        padding: 5px 0;
    }

    /* Default width for 1 replies */
    #comments-container > div,
    #comments-container > ul,
    #comments-container > * {
        width: 100%;
    }
    /* Wider width when there is more than 1 reply */
    #comments-container.has-many-comments > div,
    #comments-container.has-many-comments > ul,
    #comments-container.has-many-comments > * {
        width: 700px;
    }
}

/* NSFW overlay */
body.nsfw-locked {
    overflow: hidden;
}

/* Image embedding */
.embedded-media.embedded-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 5px auto;
    object-fit: contain;
    width: 100%;
}

.image-container {
    max-height: 640px;
    overflow: hidden;
}

.image-container .embedded-media.embedded-image {
    max-height: 100%;
    width: auto;
}

/* User mentions */
.mentions-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #90A1B9;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
}

.mentions-dropdown li {
    padding: 4px 8px;
    cursor: pointer;
}

.mentions-dropdown li:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
