/* CSS Variables for theming */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-border: #e2e8f0;
    --color-accent: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

header .subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* Sections */
.info-section {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.info-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.info-section h2 .icon {
    font-size: 1.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* Info Cards */
.info-card {
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    word-break: break-word;
}

.info-value.user-agent {
    font-size: 0.8125rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    background-color: var(--color-background);
    padding: 0.5rem;
    border-radius: 4px;
    line-height: 1.5;
}

/* Status indicators */
.info-value.supported {
    color: var(--color-accent);
}

.info-value.not-supported {
    color: #ef4444;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

footer p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Refresh Button */
.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.refresh-btn:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.02);
}

.refresh-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1rem;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.detecting {
    animation: pulse 1.5s ease-in-out infinite;
    color: var(--color-text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .info-section {
        padding: 1rem;
    }

    .info-section h2 {
        font-size: 1.125rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-card {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .info-value.user-agent {
        font-size: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #0f172a;
        --color-surface: #1e293b;
        --color-text: #f1f5f9;
        --color-text-secondary: #94a3b8;
        --color-border: #334155;
    }

    .info-card {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

    .info-value.user-agent {
        background-color: #0f172a;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }

    .info-section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .refresh-btn {
        display: none;
    }
}
