* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

header nav a {
    margin-left: 2rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

header nav a:hover {
    color: #2563eb;
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.state-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.state-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.state-card h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.state-card .count {
    color: #666;
    font-size: 0.9rem;
}

.keywords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.keyword-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.keyword-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.keyword-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.keyword-card h3 {
    padding: 1rem;
    font-size: 1.1rem;
    color: #1f2937;
}

.detail-page {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-content {
    margin-top: 2rem;
    line-height: 1.8;
}

.detail-content p {
    margin-bottom: 1rem;
}

.detail-content a {
    color: #2563eb;
    text-decoration: none;
}

.detail-content a:hover {
    text-decoration: underline;
}

.keyword-card.active {
    border: 2px solid #2563eb;
}

.selected-keyword {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.keyword-hero {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.keyword-hero img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.keyword-content {
    line-height: 1.8;
}

.keyword-content p {
    margin-bottom: 1rem;
}

.keyword-content a {
    color: #2563eb;
    text-decoration: none;
}

.keyword-content a:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f3f4f6;
    border-color: #2563eb;
}

.pagination a.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pagination-btn {
    font-weight: 500;
}

.pagination-dots {
    padding: 0.5rem;
    color: #9ca3af;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

footer {
    background: #1f2937;
    color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer nav a {
    margin-left: 2rem;
    color: #9ca3af;
    text-decoration: none;
}

footer nav a:hover {
    color: #fff;
}

.admin-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1f2937;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    font-family: inherit;
}

.btn {
    background: #2563eb;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

.success {
    background: #10b981;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error {
    background: #ef4444;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .states-grid,
    .keywords-grid {
        grid-template-columns: 1fr;
    }
    
    header .container,
    footer .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    header nav a,
    footer nav a {
        margin-left: 1rem;
    }
}
