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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    line-height: 1.6;
}

header {
    background: #16213e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-link {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: #16213e;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: #3498db;
}

.card h3:first-of-type {
    margin-top: 1rem;
}

.card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: #888;
}

.card p {
    margin: 0.5rem 0;
    color: #ccc;
}

.card ul, .card ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    color: #ccc;
}

.card li {
    margin: 0.25rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ccc;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input::placeholder {
    color: #666;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

/* Buttons */
.btn-primary {
    background: #3498db;
    border: none;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #666;
    color: #fff;
}

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #e74c3c;
    color: #fff;
}

/* Subscriptions List */
.subscription-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #222;
}

.subscription-item:last-child {
    border-bottom: none;
}

.subscription-info {
    flex: 1;
}

.subscription-info .id {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.subscription-info .url {
    font-family: monospace;
    color: #3498db;
    font-size: 0.95rem;
    word-break: break-all;
}

.subscription-info .meta {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

.subscription-info .meta span {
    margin-right: 1rem;
}

.subscription-info .wb-badge {
    display: inline-block;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Code blocks */
pre {
    background: #0d1117;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}

code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e6e6e6;
}

p code, li code, td code {
    background: rgba(255,255,255,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Tables */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #333;
}

.doc-table th {
    color: #888;
    font-weight: 600;
    font-size: 0.9rem;
}

.doc-table td {
    color: #ccc;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #888;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

.toast.success {
    background: #2ecc71;
    color: #fff;
}

.toast.error {
    background: #e74c3c;
    color: #fff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-left {
        flex-direction: column;
        gap: 0.5rem;
    }

    main {
        padding: 1rem;
    }

    .subscription-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
