:root {
    --primary: #2c3e50;
    --secondary: #2980b9;
    --bg: #fdfdfd;
    --text: #333;
    --light-text: #7f8c8d;
    --border: #ddd;
    --success: #27ae60;
    --danger: #e74c3c;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

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

/* Header & Navigation */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
    padding: 5px;
    margin-left: auto;
    /* Push to right */
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary);
}

/* Banner / Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
}

.hero h1 {
    margin: 0 0 15px;
    color: var(--primary);
    font-size: 2.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto;
}

/* Site Listing */
.wiki-section h2 {
    border-left: 5px solid var(--secondary);
    padding-left: 15px;
    margin-bottom: 25px;
}

.site-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.site-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.site-info h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.site-info h3 a {
    text-decoration: none;
    color: var(--primary);
}

.score {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.score strong {
    color: var(--success);
    font-size: 16px;
}

.license {
    font-size: 13px;
    color: var(--light-text);
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.site-actions {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.3s;
    border: none;
    cursor: pointer;
}

.btn-wiki {
    background: var(--secondary);
    color: var(--white);
}

.btn-wiki:hover {
    opacity: 0.9;
}

/* Wiki Content Grid */
.wiki-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.wiki-content article {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

.wiki-content h2 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.5rem;
}

/* Detail Page */
.wiki-breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: var(--light-text);
}

.wiki-breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}

.site-detail header {
    margin-bottom: 30px;
}

.site-detail h1 {
    margin: 0 0 10px;
    color: var(--primary);
}

.site-detail .meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--light-text);
    flex-wrap: wrap;
}

.trust-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.score-high {
    background: #eafaf1;
    color: var(--success);
}

.score-med {
    background: #fff4e5;
    color: #f39c12;
}

.info-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-box h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

th {
    color: var(--light-text);
    font-weight: 500;
    width: 40%;
}

/* Footer */
.main-footer {
    margin-top: 60px;
    padding: 40px 0;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
    color: var(--light-text);
    text-align: center;
}

.disclaimer {
    font-size: 12px;
    margin-top: 15px;
    color: #a1a1a1;
    line-height: 1.4;
}

/* Admin */
.admin-table {
    background: var(--white);
}

.admin-table th {
    background: #f4f7f6;
    color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .wiki-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    nav ul.active {
        display: flex !important;
        background: var(--white);
        z-index: 2000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .site-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .site-actions {
        width: 100%;
    }

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

    .site-detail h1 {
        font-size: 1.5rem;
    }
}