:root {
    /* Dark theme colors */
    --primary-color: var(--user-primary-color);
    --secondary-color: var(--user-secondary-color);
    --text-color: #ffffff;
    --background-color: #121212;
    --box-background: #1e1e1e;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    --border-color: rgba(255,255,255,0.1);
    --header-height: 80px;
    --bg-secondary: #2c3e50;
    --hover-color: #4f5d73;
    --text-secondary: #95a5a6;
    --code-bg: #2d2d2d;
    --code-color: #e6e6e6;
}

[data-theme="light"] {
    --text-color: #2c3e50;
    --background-color: #f5f6fa;
    --box-background: #ffffff;
    --box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    --border-color: rgba(0,0,0,0.1);
    --bg-secondary: #f7f7f7;
    --hover-color: #e5e5e5;
    --text-secondary: #666666;
    --code-bg: #f5f5f5;
    --code-color: #333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    padding-top: var(--header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background-color: var(--box-background);
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: var(--logo-height);
    width: auto;
}

.site-title {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
    position: relative;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle-icons {
    font-size: 1.2rem;
}

.theme-info {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--box-background);
    padding: 10px;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    white-space: nowrap;
    z-index: 1000;
    margin-top: 5px;
    font-size: 0.9rem;
}

.theme-toggle:hover .theme-info {
    display: block;
}

/* Summary Box */
.summary-box {
    background: var(--box-background);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.summary-box h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.summary-item {
    background: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.summary-item h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.summary-item p {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Network Info Box */
.network-info-box {
    background: var(--box-background);
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
}

.network-info-box h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-button:hover {
    background: var(--hover-color);
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* Policy Content */
.policy-content {
    padding: 10px;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
}

.policy-content h1 {
    font-size: 1.4em;
    margin: 0.3em 0;
    color: var(--text-primary);
    font-weight: 600;
}

.policy-content h2 {
    font-size: 1.2em;
    margin: 0.4em 0 0.2em;
    color: var(--text-primary);
    font-weight: 600;
}

.policy-content h3 {
    font-size: 1.1em;
    margin: 0.4em 0 0.2em;
    color: var(--text-primary);
    font-weight: 600;
}

.policy-content p {
    margin: 0.3em 0;
    color: var(--text-primary);
}

.policy-content ul, .policy-content ol {
    margin: 0.3em 0;
    padding-left: 1.2em;
}

.policy-content li {
    margin: 0.15em 0;
    color: var(--text-primary);
}

.policy-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.policy-content a:hover {
    text-decoration: underline;
}

.policy-content code {
    background: var(--background-secondary);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.policy-content pre {
    background: var(--background-secondary);
    padding: 0.5em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5em 0;
}

.policy-content blockquote {
    border-left: 2px solid var(--primary-color);
    margin: 0.5em 0;
    padding-left: 0.8em;
    color: var(--text-secondary);
}

.policy-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.8em 0;
}

.policy-content > h1:first-child {
    margin-top: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--box-background);
    font-weight: 600;
    color: var(--text-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--hover-color);
}

/* Links */
.pdb-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.pdb-link:hover {
    text-decoration: underline;
}

.pdb-link .fa-external-link-alt {
    margin-left: 4px;
    opacity: 0.7;
    font-size: 0.8em;
    vertical-align: 1px;
}

.pdb-link:hover .fa-external-link-alt {
    opacity: 1;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

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

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 5px 0;
}

.credits {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.8;
}

.credits a {
    color: var(--primary-color);
    text-decoration: none;
}

.credits a:hover {
    text-decoration: underline;
}

.last-updated {
    margin-bottom: 10px;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--background-primary);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cookie-consent {
    background-color: #ffffff;
}

[data-theme="dark"] .cookie-consent {
    background-color: #1a1a1a;
}

.cookie-content {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 500;
}

.cookie-content a:hover {
    text-decoration: underline;
}

.cookie-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.cookie-button:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .cookie-consent {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .cookie-button {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.75rem 1.5rem;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        text-align: center;
    }

    .theme-toggle-wrapper {
        margin-top: 10px;
        margin-left: 0;
    }

    .container {
        padding-top: 20px;
    }

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

    .tabs {
        flex-direction: column;
        gap: 10px;
    }

    .tab-button {
        width: 100%;
        text-align: center;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 12px 15px;
    }
}
