* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

header {
    background: #1a2a44;
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #00aaff;
}

main {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 2rem;
}

.search-section {
    text-align: center;
    margin-bottom: 3rem;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1a2a44;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#keywordInput, #competitorInput {
    padding: 1rem;
    width: 300px;
    border: 2px solid #e0e4e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#keywordInput:focus, #competitorInput:focus {
    border-color: #00aaff;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.2);
    outline: none;
}

button {
    padding: 1rem 2rem;
    background: #00aaff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #0088cc;
    transform: translateY(-2px);
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h3 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.metric-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2a44;
}

.trend-section, .keyword-clusters, .related-keywords, .keyword-gap, .focus-keywords, .meta-tags, .content-gap {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

h2 {
    margin-bottom: 1.5rem;
    color: #1a2a44;
    font-size: 1.8rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filters select {
    padding: 0.75rem;
    border: 2px solid #e0e4e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filters select:focus {
    border-color: #00aaff;
    outline: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e4e8;
}

th {
    background: #f8f9fa;
    color: #666;
    font-weight: 500;
}

.loader {
    display: none;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #00aaff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
}

#clusterList, #focusKeywordList {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cluster-item, .focus-item {
    background: #e6f0fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1a2a44;
}

#metaTagsOutput {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    color: #333;
}

#contentGapList {
    list-style: none;
}

#contentGapList li {
    padding: 0.75rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

#contentGapList li:hover {
    background: #e6f0fa;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #fff;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}