/* Shared styles — reset, body, site header, container, share dropdown, light mode */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #0a0f1a;
    color: #e2e8f0;
}

.site-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h1 {
    font-size: 1.25rem;
    font-weight: 500;
}

.site-header h1 a {
    color: white;
    text-decoration: none;
}

.site-header h1 a:hover {
    color: rgba(255,255,255,0.7);
}

.site-header .nav-links {
    display: flex;
    gap: 1.5rem;
}

.site-header .nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.site-header .nav-link:hover {
    color: white;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.share-wrapper {
    position: relative;
    display: inline-block;
}

.share-dropdown {
    display: none;
    position: absolute;
    left: 0;
    min-width: 200px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 50;
    overflow: hidden;
}

.share-dropdown.up { bottom: 100%; margin-bottom: 4px; }
.share-dropdown.down { top: 100%; margin-top: 4px; }

.share-dropdown.open { display: block; }

.share-dropdown a,
.share-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.share-dropdown a:hover,
.share-dropdown button:hover {
    background: #334155;
}

.share-dropdown .divider {
    height: 1px;
    background: #334155;
    margin: 0;
}

.share-dropdown button.copied {
    color: #22c55e;
}

@media (prefers-color-scheme: light) {
    body { background: #fafafa; color: #1a1a1a; }
    .share-dropdown { background: white; border-color: #ddd; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
    .share-dropdown a, .share-dropdown button { color: #333; }
    .share-dropdown a:hover, .share-dropdown button:hover { background: #f5f5f5; }
    .share-dropdown .divider { background: #eee; }
}
