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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f172a;
    color: #94a3b8;
    padding: 20px;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #1e293b;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.breadcrumb {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: #2563eb;
    gap: 12px;
}

.breadcrumb a::before {
    content: '←';
    font-size: 18px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #334155;
}

h1 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #94a3b8;
    font-size: 1.1em;
    font-weight: 400;
}

.input-section {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.05em;
}

textarea,
input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 16px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

textarea {
    min-height: 200px;
    font-family: 'Courier New', 'Consolas', monospace;
    resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea::placeholder,
input::placeholder {
    color: #64748b;
}

small {
    color: #64748b;
    font-size: 13px;
    display: block;
    margin-top: 5px;
}

.helper-text {
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 5px 10px;
}

.btn-link:hover {
    color: #2563eb;
}

.settings-panel {
    background: #0f172a;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #334155;
}

.settings-panel h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #475569;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-small {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #2563eb;
}

.ad-space-banner {
    min-height: 280px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    padding: 15px;
}

.ad-space-native {
    margin: 50px 0;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #334155;
}

.error-section {
    background: #7f1d1d;
    border: 2px solid #991b1b;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    color: #fca5a5;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.error-icon {
    font-size: 24px;
    color: #fca5a5;
}

.error-section strong {
    color: #ffffff;
}

.results-summary {
    background: #0f172a;
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
    border: 1px solid #334155;
}

.results-summary h2 {
    color: #10b981;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #334155;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 8px;
}

.stat-label {
    color: #94a3b8;
    font-size: 14px;
}

.export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-section {
    margin: 40px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-header h3 {
    color: #ffffff;
    font-size: 1.5em;
}

.search-input {
    padding: 10px 16px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    width: 300px;
}

.cluster-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cluster-card {
    background: #0f172a;
    border-radius: 10px;
    border: 1px solid #334155;
    overflow: hidden;
}

.cluster-header {
    padding: 20px;
    background: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.cluster-header:hover {
    background: #0f172a;
}

.cluster-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cluster-id {
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
}

.cluster-label {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.cluster-size {
    color: #94a3b8;
    font-size: 14px;
    background: #334155;
    padding: 4px 10px;
    border-radius: 4px;
}

.cluster-intent {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.intent-informational {
    background: #1e40af;
    color: #93c5fd;
}

.intent-commercial {
    background: #7c2d12;
    color: #fdba74;
}

.intent-transactional {
    background: #166534;
    color: #86efac;
}

.intent-local {
    background: #581c87;
    color: #d8b4fe;
}

.expand-icon {
    color: #64748b;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.cluster-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.cluster-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cluster-card.expanded .cluster-content {
    max-height: 2000px;
}

.cluster-details {
    padding: 25px;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section strong {
    color: #ffffff;
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
}

.pillar-keyword {
    color: #10b981;
    font-size: 16px;
    font-weight: 600;
}

.keyword-list {
    list-style: none;
}

.keyword-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: #1e293b;
    border-radius: 6px;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.modifiers {
    color: #fbbf24;
    font-size: 12px;
}

.intent-tag {
    background: #334155;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
}

.title-templates {
    list-style: none;
}

.title-templates li {
    padding: 12px;
    margin-bottom: 10px;
    background: #1e293b;
    border-radius: 6px;
    color: #e2e8f0;
    border-left: 3px solid #3b82f6;
}

.linking-blueprint {
    background: #1e293b;
    padding: 20px;
    border-radius: 6px;
}

.linking-blueprint p {
    margin-bottom: 12px;
    color: #94a3b8;
}

.linking-blueprint strong {
    color: #ffffff;
    display: inline;
    margin-right: 8px;
}

.linking-blueprint ul {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 15px;
}

.linking-blueprint li {
    color: #94a3b8;
    margin-bottom: 6px;
}

.cluster-actions {
    margin-top: 20px;
}

.faq-section {
    background: #0f172a;
    padding: 40px;
    border-radius: 10px;
    margin-top: 60px;
    border: 1px solid #334155;
}

.faq-section h2 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 700;
}

.faq-item {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #334155;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: #3b82f6;
    font-size: 1.3em;
    margin-bottom: 12px;
    font-weight: 600;
}

.faq-item p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid #334155;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-column p {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
}

.footer-bottom p {
    color: #64748b;
    font-size: 14px;
}

.footer-bottom a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #2563eb;
}

.copy-feedback {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .container {
        padding: 24px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cluster-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Content Gap Specific Styles */
.error-box {
    background: #7f1d1d;
    border: 1px solid #991b1b;
    color: #fecaca;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.results-section {
    margin-top: 40px;
}

.results-section > h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
}

.stat-value {
    font-size: 3em;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 10px;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9em;
}

.result-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.result-card h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.4em;
}

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

.data-table thead th {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #334155;
}

.data-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
}

.data-table tbody tr:hover {
    background: #1e293b;
}

.faq-section {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.faq-section > h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #334155;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.faq-q {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.faq-a {
    color: #94a3b8;
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.site-footer {
    background: #1e293b;
    border-top: 1px solid #334155;
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9em;
}

.footer-bottom a {
    color: #3b82f6;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #2563eb;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Recommendations List */
.recommendations {
    list-style: none;
    padding: 0;
}

.recommendations li {
    padding: 12px 15px 12px 40px;
    margin-bottom: 10px;
    background: #1e293b;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    position: relative;
}

.recommendations li::before {
    content: "✓";
    position: absolute;
    left: 15px;
    color: #10b981;
    font-weight: bold;
}

/* Export buttons */
.export-section {
    margin-top: 30px;
    padding: 20px;
    background: #1e293b;
    border-radius: 8px;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-export {
    background: #64748b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-export:hover {
    background: #475569;
}

/* Progress indicator */
.progress-box {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.progress-bar {
    background: #334155;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background: #3b82f6;
    height: 100%;
    transition: width 0.3s;
}
