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

:root {
    --bg: #fff;
    --text: #1a1a1a;
    --border: #e0e0e0;
    --link: #0066cc;
    --summary-bg: #f7f7f7;
    --danger: #dc3545;
}

[data-theme="dark"] {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --border: #333;
    --link: #66b3ff;
    --summary-bg: #252525;
    --danger: #ff6b6b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

nav {
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.logo {
    font-size: 1.25rem;
    font-weight: 300;
    text-decoration: none;
    color: var(--text);
}

.admin-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    z-index: 101;
}

.loading-container {
    position: relative;
}

.loading-status {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.loading-text {
    opacity: 0.6;
    font-style: italic;
}

.article-summary.loaded {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 250px;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    padding: 2rem;
    max-width: 800px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.version-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.875rem;
    opacity: 0.7;
}

.version-panel {
    background: var(--summary-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.delete-btn {
    padding: 0.25rem 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.sidebar {
    border-left: 1px solid var(--border);
    padding: 2rem 1rem;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
}

.sidebar h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.article-summary {
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0 0 2rem 0;
    padding: 1.5rem;
    background: var(--summary-bg);
    border-radius: 8px;
    border-left: 3px solid var(--link);
    min-height: 80px;
}

.article-content {
    line-height: 1.8;
    animation: fadeIn 0.5s;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: none;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown.active {
    display: block;
}

button {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text);
}

button:hover {
    background: var(--summary-bg);
}

.recent-searches {
    list-style: none;
}

.recent-searches li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.recent-searches a {
    color: var(--text);
    text-decoration: none;
    opacity: 0.8;
    text-transform: capitalize;
}

.search {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: var(--bg);
    color: var(--text);
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}
