:root {
    --bg-dark: #0a0101;
    --card-bg: rgba(45, 10, 10, 0.7);
    --accent: #ff3333;
    --accent-gradient: linear-gradient(to right, #ff4c4c, #e60000);
    --text-primary: #ffffff;
    --text-secondary: #fca5a5;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: sans-serif;
    margin: 0;
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: 100vh;
    background-image: radial-gradient(circle at center, #2e0505 0%, #0a0101 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stale-sync-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.stale-sync-card {
    background: rgba(20, 5, 5, 0.98);
    border: 1px solid rgba(255, 90, 90, 0.6);
    border-radius: 14px;
    padding: 24px;
    width: 92%;
    max-width: 520px;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.stale-sync-card h3 {
    margin: 0 0 10px 0;
    color: var(--accent);
}

.stale-sync-card p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
}

.stale-sync-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
}

.stale-sync-list div {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stale-sync-list div:last-child {
    border-bottom: none;
}

.stale-sync-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.stale-sync-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.stale-sync-btn.danger {
    background: rgba(255, 60, 60, 0.2);
    border-color: rgba(255, 80, 80, 0.6);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(10, 1, 1, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 100, 100, 0.1);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.8rem 1rem;
    width: 100%;
    position: relative;
}

.global-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 1rem 1rem 1rem;
    width: 100%;
}

.nav-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 100, 100, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(255, 50, 50, 0.1);
    color: white;
    border-color: var(--accent);
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 3px;
    border-radius: 8px;
}

h1 {
    font-size: 1.8rem;
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sync Indicator Styles */
.header-sync-btn {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 9999 !important;
    width: 42px !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.header-sync-btn svg {
    width: 26px !important;
    height: 26px !important;
}

.header-sync-btn:hover {
    filter: brightness(0.95) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Mobile Optimization */
@media screen and (max-width: 850px) {
    body { padding-top: 120px; }
    h1 { font-size: 1.5rem !important; }
    .logo { width: 40px; height: 40px; }
    .header-sync-btn { right: 10px !important; width: 36px !important; height: 36px !important; }
    .header-sync-btn svg { width: 22px !important; height: 22px !important; }
}

/* Footer Drawer */
.footer-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 1, 1, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 100, 100, 0.15);
    z-index: 2000;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transform: translateY(0);
    transition: transform 0.25s ease;
}

.footer-drawer.collapsed {
    transform: translateY(calc(100% - 28px));
}

.footer-drawer-toggle {
    width: 100%;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.footer-drawer-toggle::before {
    content: '';
    width: 10px;
    height: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    transform: rotate(-45deg);
    transition: 0.2s;
}

.footer-drawer.collapsed .footer-drawer-toggle::before {
    transform: rotate(135deg);
}

.footer-content {
    text-align: center;
    padding: 0.8rem 1rem 1rem;
}

.footer-content a {
    color: var(--accent) !important;
    text-decoration: none !important;
    margin-left: 10px;
    transition: 0.2s;
    cursor: pointer !important;
    display: inline-block;
}

.footer-content a:hover {
    color: white !important;
    text-decoration: underline !important;
}
