/* CSS Variables for theming */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: #334155;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Main content */
main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    flex: 1;
}

/* Info cards */
.info-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
}

.card-header .icon {
    font-size: 1.5rem;
}

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

.card-content {
    padding: 1.25rem 1.5rem;
}

/* Info rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.info-row .value.user-agent {
    font-size: 0.75rem;
    font-weight: 400;
    max-height: 3rem;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Plugins list */
.plugins-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plugin-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.plugin-item::before {
    content: '🔹';
    font-size: 0.75rem;
}

.no-plugins {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--background);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    transition: background 0.2s ease;
}

.feature-item:hover {
    background: var(--border-color);
}

.feature-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-status.supported {
    background: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.feature-status.not-supported {
    background: var(--error-color);
    box-shadow: 0 0 6px var(--error-color);
}

.feature-name {
    color: var(--text-primary);
    font-weight: 500;
}

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

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

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

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

    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    main {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-row .value {
        text-align: left;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-content {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

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

    .logo img {
        width: 40px;
        height: 40px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .card-header h2 {
        font-size: 1rem;
    }
}

/* Animations */
.info-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Print styles */
@media print {
    .info-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .info-card:hover {
        transform: none;
    }

    header, footer {
        text-align: center;
    }
}
