/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #0891b2 100%);
    min-height: 100vh;
    color: #1a1a1a;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #0ea5e9;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.header p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #2d3748;
}

/* Algorithm Detection Section */
.algorithm-detection-section {
    margin-bottom: 30px;
}

.algorithm-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 69, 19, 0.3);
}

.algorithm-card h2 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.algorithm-options {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #8b4513;
    margin-bottom: 25px;
}

.algorithm-status {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #0ea5e9;
    margin-bottom: 20px;
    position: relative;
}

.algorithm-status.algorithm-active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-label {
    font-size: 0.85rem;
    color: #2d3748;
    font-weight: 600;
}

.status-value {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.status-badge.active {
    background: #10b981;
    color: white;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.status-badge.inactive {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.status-details {
    text-align: center;
}

.status-details small {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.algorithm-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Algorithm Factors */
.algorithm-factors {
    margin-top: 25px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 20px;
}

.algorithm-factors h3 {
    color: #10b981;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.factor-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #10b981;
    position: relative;
    transition: all 0.3s ease;
}

.factor-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

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

.factor-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.factor-weight {
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.factor-description {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.4;
}

/* SEO Trends */
.seo-trends {
    margin-top: 25px;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-radius: 15px;
    padding: 20px;
}

.seo-trends h3 {
    color: #ef4444;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trends-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.trend-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #ef4444;
    position: relative;
}

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

.trend-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.trend-importance {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.trend-importance.critical {
    background: #dc2626;
}

.trend-importance.high {
    background: #ea580c;
}

.trend-importance.medium {
    background: #ca8a04;
}

.trend-description {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 10px;
    line-height: 1.4;
}

.trend-recommendations {
    font-size: 0.8rem;
    color: #1a1a1a;
}

.trend-recommendations ul {
    margin: 5px 0;
    padding-left: 15px;
}

.trend-recommendations li {
    margin-bottom: 3px;
}

/* API Configuration Section */
.api-section {
    margin-bottom: 30px;
}

.api-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.api-card h2 {
    color: #0ea5e9;
    margin-bottom: 20px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.engine-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    border: 2px solid #0ea5e9;
}

.api-key-group {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    border: 2px solid #bae6fd;
    position: relative;
    transition: all 0.3s ease;
}

.api-key-group:first-child {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.api-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.api-key-title {
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.api-count {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.api-count.has-keys {
    background: #e0f2fe;
    color: #0ea5e9;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.api-status.connected {
    background: #dcfce7;
    color: #166534;
}

.api-status.disconnected {
    background: #fef2f2;
    color: #dc2626;
}

.api-status.testing {
    background: #fef3c7;
    color: #92400e;
}

.api-status i {
    font-size: 0.8rem;
}

.api-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.api-summary {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Keyword Scraping Section */
.keyword-scraping-section {
    margin-bottom: 30px;
}

.scraping-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.scraping-card h2 {
    color: #10b981;
    margin-bottom: 20px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.scraping-options {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #10b981;
}

.scraping-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Form Styles */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.form-card h2 {
    color: #0ea5e9;
    margin-bottom: 25px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.keyword-count {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.keyword-count.has-keywords {
    background: #e0f2fe;
    color: #0ea5e9;
}

.ad-info {
    font-size: 0.8rem;
    color: #0891b2;
    font-weight: 500;
    background: #cffafe;
    padding: 2px 8px;
    border-radius: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #bae6fd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-family: inherit;
    resize: vertical;
}

.form-group textarea {
    min-height: 140px;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-group small a {
    color: #0ea5e9;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

/* Ad Scripts Section */
.ad-scripts-section {
    margin-top: 25px;
}

.ad-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 15px;
    padding: 20px;
}

.ad-card h3 {
    color: #0ea5e9;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Backlinks Section */
.backlinks-section {
    margin-top: 25px;
}

.backlinks-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 20px;
}

.backlinks-card h3 {
    color: #10b981;
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.backlinks-description {
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

#backlinksContainer {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 15px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.backlink-item {
    background: white;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.backlink-item:hover {
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.backlink-item:last-child {
    margin-bottom: 0;
}

.backlink-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: flex-start;
}

.backlink-input-group .form-group {
    margin-bottom: 0;
}

.backlink-input-group input {
    padding: 10px 12px;
    border: 1px solid #d1fae5;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.backlink-input-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.remove-backlink {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.remove-backlink:hover:not(:disabled) {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.backlinks-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive backlinks */
@media (max-width: 768px) {
    .backlink-input-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .remove-backlink {
        width: 100%;
    }
}

/* Scheduling Section */
.scheduling-section {
    margin-top: 25px;
}

.scheduling-card {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 20px;
}

.scheduling-card h3 {
    color: #f59e0b;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scheduling-options {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 2px solid #f59e0b;
}

.schedule-preview {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 10px;
}

.schedule-preview h4 {
    color: #0ea5e9;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-timeline {
    max-height: 200px;
    overflow-y: auto;
}

.preview-info {
    color: #64748b;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.timeline-article {
    font-weight: 600;
    color: #0f172a;
}

.timeline-datetime {
    color: #64748b;
    font-size: 0.85rem;
}

.timeline-interval {
    background: #f59e0b;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #0ea5e9;
}

/* Date and time input styling */
input[type="date"],
input[type="time"] {
    padding: 10px 12px;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

input[type="date"]:focus,
input[type="time"]:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* SEO Features Info */
.seo-features-info {
    margin-top: 25px;
}

.seo-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 20px;
}

.seo-card h3 {
    color: #10b981;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #065f46;
}

.feature-item i {
    color: #10b981;
    font-size: 0.9rem;
}

/* Article Preview Info */
.article-preview-info {
    margin-top: 25px;
}

.preview-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px solid #0ea5e9;
    border-radius: 15px;
    padding: 20px;
}

.preview-card h3 {
    color: #0ea5e9;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
}

/* Control Section */
.control-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.control-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Download Section */
.download-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 15px;
    border: 2px solid #0ea5e9;
}

.download-section h3 {
    color: #0ea5e9;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #0ea5e9;
    color: #0ea5e9;
}

.btn-outline:hover:not(:disabled) {
    background: #0ea5e9;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 36px;
}

/* Generation Info */
.generation-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #0ea5e9;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

/* Progress Bar */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.4);
}

.progress-text {
    display: block;
    text-align: center;
    font-weight: 600;
    color: #374151;
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

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

.results-header h2 {
    color: #0ea5e9;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.results-count {
    background: #e0f2fe;
    color: #0ea5e9;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-container {
    min-height: 200px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: #0ea5e9;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.empty-state small {
    font-size: 0.9rem;
}

/* Pagination Styles */
.simple-pagination {
    margin-top: 30px;
    text-align: center;
}

.simple-pagination button {
    margin: 2px;
    padding: 8px 12px;
    border: 2px solid #bae6fd;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #374151;
    min-width: 40px;
}

.simple-pagination button.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.simple-pagination button:hover:not(.active) {
    background: #f0f9ff;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.simple-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.simple-pagination button:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Static Website Pagination */
.static-pagination {
    margin-top: 30px;
    text-align: center;
}

.static-pagination button {
    margin: 2px;
    padding: 8px 12px;
    border: 2px solid #bae6fd;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #374151;
    min-width: 40px;
}

.static-pagination button.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.static-pagination button:hover:not(.active) {
    background: #f0f9ff;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

/* Legacy pagination styles for backward compatibility */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    border: 2px solid #bae6fd;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination.center {
    justify-content: center;
}

.pagination-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-btn {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    font-size: 0.9rem;
}

.page-btn:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.page-btn.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Article Cards */
.article-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
    margin-bottom: 15px;
}

.article-info h3 {
    color: #0f172a;
    margin-bottom: 8px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.seo-score {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

.seo-score.excellent {
    background: #dcfce7;
    color: #166534;
}

.seo-score.good {
    background: #fef3c7;
    color: #92400e;
}

.seo-score.needs-improvement {
    background: #fef2f2;
    color: #dc2626;
}

.article-actions {
    display: flex;
    gap: 10px;
    align-self: start;
}

.article-preview {
    margin-top: 15px;
}

.preview-content {
    color: #2d3748;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(14, 165, 233, 0.4);
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.modal-header h3 {
    color: #0f172a;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.7;
}

/* SEO Report Section */
.seo-report-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.seo-report-section h4 {
    color: #10b981;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-overview {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 25px;
    align-items: center;
    margin-bottom: 25px;
}

.seo-score-display {
    text-align: center;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 4px solid;
    position: relative;
}

.seo-score-display.excellent .score-circle {
    border-color: #10b981;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.seo-score-display.good .score-circle {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.seo-score-display.needs-improvement .score-circle {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fecaca);
}

.score-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.score-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.score-status {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.seo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.seo-checks h5 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 1rem;
}

.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.check-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid;
    position: relative;
}

.check-item.excellent {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.check-item.good {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.check-item.needs-improvement {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

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

.check-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

.check-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: #374151;
}

.check-details {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
}

.check-status-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
}

.check-item.excellent .check-status-icon {
    color: #10b981;
}

.check-item.good .check-status-icon {
    color: #f59e0b;
}

.check-item.needs-improvement .check-status-icon {
    color: #ef4444;
}

.article-content h1, 
.article-content h2, 
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #0f172a;
    margin-top: 25px;
    margin-bottom: 15px;
}

.article-content h1 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    border-bottom: 2px solid #0ea5e9;
    padding-bottom: 10px;
}

.article-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: #0ea5e9;
}

.article-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
    color: #06b6d4;
}

.article-content h4 {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #0891b2;
}

.article-content h5 {
    font-size: clamp(0.95rem, 1.8vw, 1rem);
    color: #0e7490;
}

.article-content h6 {
    font-size: clamp(0.9rem, 1.6vw, 0.95rem);
    color: #155e75;
}

.article-content p {
    margin-bottom: 15px;
    color: #2d3748;
}

.article-content ul,
.article-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
    color: #2d3748;
}

.article-metadata {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #0ea5e9;
}

.article-metadata h4 {
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.metadata-item {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.metadata-item strong {
    color: #374151;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0ea5e9;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .control-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .download-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .article-header {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .article-actions {
        justify-self: start;
    }
    
    .preview-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .seo-features-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .seo-overview {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .checks-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .scraping-controls {
        justify-content: center;
    }
    
    .algorithm-controls {
        justify-content: center;
    }
    
    .factors-grid {
        grid-template-columns: 1fr;
    }
    
    .trends-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .download-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-actions {
        justify-content: space-between;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-stats {
        grid-template-columns: 1fr;
    }
    
    .seo-features-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .page-numbers {
        justify-content: center;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .scraping-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .algorithm-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content,
    .input-section,
    .control-section,
    .results-section,
    .api-card,
    .scraping-card,
    .algorithm-card {
        padding: 20px;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    .btn-text {
        display: none;
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .seo-report-section {
        padding: 20px;
    }
    
    .score-circle {
        width: 60px;
        height: 60px;
    }
    
    .score-number {
        font-size: 1.2rem;
    }
    
    .pagination {
        padding: 15px;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .algorithm-factors,
    .seo-trends {
        padding: 15px;
    }
    
    .factor-item,
    .trend-item {
        padding: 12px;
    }
}

/* Hide text on very small screens for buttons */
@media (max-width: 360px) {
    .btn span:not(.btn-text) {
        display: none;
    }
    
    .btn {
        min-width: 48px;
        padding: 12px;
    }
}

/* Animation for API status changes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.api-status.testing i {
    animation: pulse 1s infinite;
}

/* Smooth transitions for all interactive elements */
.btn, .article-card, .modal-content, .api-key-group, .check-item, .page-btn, .factor-item, .trend-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
.btn:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.page-btn:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Competitor Analysis Styles */
.competitor-analysis-report {
    max-width: 100%;
}

.analysis-section {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.analysis-section h4 {
    color: #0f172a;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.summary-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.summary-value {
    font-size: 1.2rem;
    color: #0f172a;
    font-weight: 700;
}

.competitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.competitor-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.competitor-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
}

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

.competitor-rank {
    background: #0ea5e9;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.competitor-score {
    background: #10b981;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.competitor-card h5 {
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.3;
}

.competitor-url {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.competitor-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.metric-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.metric-value {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 700;
}

.competitor-strengths,
.competitor-weaknesses {
    margin-bottom: 10px;
}

.competitor-strengths strong {
    color: #10b981;
    font-size: 0.85rem;
}

.competitor-weaknesses strong {
    color: #ef4444;
    font-size: 0.85rem;
}

.competitor-strengths ul,
.competitor-weaknesses ul {
    margin: 5px 0 0 15px;
    padding: 0;
}

.competitor-strengths li,
.competitor-weaknesses li {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 3px;
}

.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.opportunity-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid;
    position: relative;
}

.opportunity-card.priority-high {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.opportunity-card.priority-medium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.opportunity-card.priority-low {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

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

.opportunity-type {
    background: #64748b;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.opportunity-priority {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
}

.priority-high .opportunity-priority {
    background: #ef4444;
    color: white;
}

.priority-medium .opportunity-priority {
    background: #f59e0b;
    color: white;
}

.priority-low .opportunity-priority {
    background: #10b981;
    color: white;
}

.opportunity-card h5 {
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.opportunity-card p {
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.opportunity-impact {
    font-size: 0.8rem;
    color: #374151;
}

.content-gaps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gap-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.gap-item h5 {
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.gap-item p {
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.4;
}

.technical-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.insight-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.insight-value {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recommendation-category {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e2e8f0;
}

.recommendation-category h5 {
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.priority-critical {
    background: #dc2626;
    color: white;
}

.priority-badge.priority-high {
    background: #ef4444;
    color: white;
}

.priority-badge.priority-medium {
    background: #f59e0b;
    color: white;
}

.recommendation-category ul {
    margin: 0;
    padding-left: 20px;
}

.recommendation-category li {
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Responsive adjustments for competitor analysis */
@media (max-width: 768px) {
    .competitors-grid {
        grid-template-columns: 1fr;
    }
    
    .opportunities-grid {
        grid-template-columns: 1fr;
    }
    
    .content-gaps {
        grid-template-columns: 1fr;
    }
    
    .technical-insights {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recommendations {
        grid-template-columns: 1fr;
    }
    
    .competitor-metrics {
        grid-template-columns: 1fr;
    }
}

/* Related Articles Section - Display in Articles */
.related-articles-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.related-articles-section h3 {
    color: #10b981;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.related-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-articles-list li {
    margin-bottom: 12px;
}

.related-articles-list li:last-child {
    margin-bottom: 0;
}

.related-articles-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 8px;
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 100%;
    word-break: break-word;
}

.related-articles-list a::before {
    content: '→';
    font-size: 1.1rem;
}

.related-articles-list a:hover {
    background: #10b981;
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.related-articles-list a:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .technical-insights {
        grid-template-columns: 1fr;
    }

    .competitor-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .opportunity-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .related-articles-section {
        padding: 15px;
    }

    .related-articles-list a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}