.app-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    min-height: 40px;
}

.app-footer-legal {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.app-footer-brand {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.app-footer-brand:hover {
    color: var(--accent-blue);
}

.app-footer-version {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 0;
    margin-left: 0.35rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.app-footer-version:hover {
    opacity: 0.85;
}

.app-footer-tools {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-footer--minimal .app-footer-inner {
    justify-content: center;
}

.changelog-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
}

.changelog-modal[hidden] {
    display: none !important;
}

.changelog-modal-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.changelog-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.changelog-modal-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.changelog-modal-title i {
    color: var(--accent-blue);
}

.changelog-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.changelog-modal-close:hover {
    color: var(--text-main);
}

.changelog-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
}

.changelog-loading {
    display: flex;
    justify-content: center;
    padding: 2.5rem;
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.changelog-modal-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    text-align: right;
    background: var(--bg-field-muted);
}

.changelog-modal-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.changelog-modal-btn:hover {
    opacity: 0.92;
}

#changelogContent::-webkit-scrollbar { width: 8px; }
#changelogContent::-webkit-scrollbar-track { background: transparent; }
#changelogContent::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 10px; }

.markdown-body { font-family: 'Inter', sans-serif; }
.markdown-body h1 { font-size: 1.35rem; margin-top: 0; color: var(--text-main); }
.markdown-body h2 { font-size: 1.05rem; color: var(--text-main); border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; margin-top: 1.75rem; margin-bottom: 0.85rem; }
.markdown-body h3 { font-size: 0.9rem; color: var(--accent-blue); margin-top: 1.25rem; margin-bottom: 0.65rem; font-weight: 600; }
.markdown-body p { margin-bottom: 0.85rem; }
.markdown-body ul { padding-left: 1.5rem; margin-bottom: 1.25rem; list-style-type: disc; }
.markdown-body li { margin-bottom: 0.45rem; color: var(--text-main); }
.markdown-body li strong { font-weight: 600; }
.markdown-body code { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); padding: 0.15rem 0.35rem; border-radius: 6px; font-family: ui-monospace, monospace; font-size: 90%; }
.markdown-body table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 1.5rem; border: 1px solid var(--border-subtle); border-radius: 8px; overflow: hidden; }
.markdown-body th { background: var(--bg-field-header); color: var(--text-main); padding: 10px 14px; text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.markdown-body td { border-top: 1px solid var(--border-subtle); padding: 10px 14px; font-size: 0.8rem; vertical-align: top; }
.markdown-body hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 2rem 0; }
.markdown-body a { color: var(--accent-blue); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }

.modal-fade-in { animation: modalFadeIn 0.3s ease-out forwards; }
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

[data-theme="dark"] .theme-toggle-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #fbbf24;
}

.server-time-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-field-muted);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.server-time-date {
    opacity: 0.65;
    margin-left: 4px;
    font-size: 10px;
}

.pulse-dot {
    height: 6px;
    width: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: server-pulse 2s infinite;
}

@keyframes server-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .app-footer-tools {
        position: static;
        margin-top: 0.5rem;
    }

    .app-footer-inner {
        flex-direction: column;
    }
}
