/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #1a1a1e;
    --bg-tertiary: #2a2a31;
    --text-primary: #e8e8ea;
    --text-secondary: #a8a8aa;
    --text-muted: #6a6a6e;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: #3a3a41;
    --border-light: #4a4a51;
    --shadow: rgba(0, 0, 0, 0.3);
    --font-mono: "JetBrains Mono", "Fira Code", "Monaco", "Consolas", monospace;
}

body {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(
        135deg,
        var(--accent-primary),
        var(--accent-secondary)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-size: 0.85rem;
    z-index: 1000;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

.status-text {
    color: var(--text-secondary);
    font-weight: 300;
}

/* Demo mode indicator */
.demo-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: 1rem;
    font-size: 0.85rem;
    z-index: 1000;
}

.demo-icon {
    font-size: 1rem;
    filter: grayscale(20%);
}

.demo-text {
    color: var(--warning);
    font-weight: 300;
}

/* Main content */
.main {
    flex: 1;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-icon {
    font-size: 1.1rem;
}

.count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
}

.category-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Grid layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--accent-primary),
        var(--accent-secondary)
    );
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.card:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card-body {
    margin-top: 1rem;
}

/* Service cards */
.service-card {
    /* Additional service-specific styles if needed */
}

.service-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.service-url {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 400;
    word-break: break-all;
}

/* Bookmark cards */
.bookmark-card {
    /* Additional bookmark-specific styles if needed */
}

.bookmark-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

/* External link icon */
.external-link {
    color: var(--text-muted);
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.card:hover .external-link {
    opacity: 1;
    color: var(--accent-primary);
}

/* Error message */
.error-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-text {
    color: var(--error);
    font-weight: 400;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.empty-state p {
    font-size: 0.9rem;
    font-weight: 300;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

.footer-separator {
    color: var(--border);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .card {
        padding: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .card {
        padding: 1rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}
.card:nth-child(2) {
    animation-delay: 0.2s;
}
.card:nth-child(3) {
    animation-delay: 0.3s;
}
.card:nth-child(4) {
    animation-delay: 0.4s;
}
.card:nth-child(5) {
    animation-delay: 0.5s;
}
.card:nth-child(6) {
    animation-delay: 0.6s;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
