/**
 * AI Meta Tag Analyzer - Main Stylesheet
 * Fully responsive, accessible, and optimized for performance
 */

/* CSS Variables for Theme Support */
:root {
    --ama-bg-primary: #fafafa;
    --ama-bg-card: #ffffff;
    --ama-bg-muted: #f5f5f5;
    --ama-border: #e5e5e5;
    --ama-text-primary: #171717;
    --ama-text-secondary: #737373;
    --ama-text-tertiary: #a3a3a3;
    --ama-primary: #7c3aed;
    --ama-primary-dark: #6d28d9;
    --ama-primary-light: #a78bfa;
    --ama-success-bg: #dcfce7;
    --ama-success-text: #166534;
    --ama-success-border: #22c55e;
    --ama-warning-bg: #fef9c3;
    --ama-warning-text: #854d0e;
    --ama-warning-border: #eab308;
    --ama-error-bg: #fee2e2;
    --ama-error-text: #991b1b;
    --ama-error-border: #ef4444;
    --ama-info-bg: #dbeafe;
    --ama-info-text: #1e40af;
    --ama-info-border: #3b82f6;
    --ama-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ama-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --ama-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --ama-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --ama-radius-sm: 8px;
    --ama-radius-md: 12px;
    --ama-radius-lg: 16px;
    --ama-radius-xl: 24px;
}

/* Dark Mode Variables */
.ama-dark-mode {
    --ama-bg-primary: #0a0a0a;
    --ama-bg-card: #171717;
    --ama-bg-muted: #262626;
    --ama-border: #404040;
    --ama-text-primary: #fafafa;
    --ama-text-secondary: #a3a3a3;
    --ama-text-tertiary: #737373;
    --ama-primary: #a78bfa;
    --ama-primary-dark: #8b5cf6;
    --ama-primary-light: #c4b5fd;
    --ama-success-bg: rgba(22, 163, 74, 0.15);
    --ama-success-text: #86efac;
    --ama-success-border: #22c55e;
    --ama-warning-bg: rgba(234, 179, 8, 0.15);
    --ama-warning-text: #fde047;
    --ama-warning-border: #eab308;
    --ama-error-bg: rgba(239, 68, 68, 0.15);
    --ama-error-text: #fca5a5;
    --ama-error-border: #ef4444;
    --ama-info-bg: rgba(59, 130, 246, 0.15);
    --ama-info-text: #93c5fd;
    --ama-info-border: #3b82f6;
}

/* Reset & Base Styles */
.ai-meta-analyzer-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ai-meta-analyzer-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--ama-text-primary);
    transition: background 0.3s ease;
}

.ama-dark-mode.ai-meta-analyzer-wrapper {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

/* Container */
.ai-meta-analyzer-wrapper > .ama-header,
.ai-meta-analyzer-wrapper > .ama-input-section,
.ai-meta-analyzer-wrapper > .ama-results,
.ai-meta-analyzer-wrapper > .ama-footer-seo {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--ama-bg-card);
    border-radius: var(--ama-radius-xl);
    box-shadow: var(--ama-shadow-xl);
    animation: amaFadeIn 0.5s ease;
}

@keyframes amaFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ama-header {
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    color: white;
    padding: 50px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.ama-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.ama-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: var(--ama-radius-md);
    cursor: pointer;
    font-size: 22px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ama-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05) rotate(15deg);
}

.ama-header h1 {
    font-size: 2.5em;
    margin-bottom: 12px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.ama-subtitle {
    font-size: 1.15em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
    margin-bottom: 16px;
}

.ama-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.ama-features span {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Input Section */
.ama-input-section {
    padding: 40px 30px;
    background: var(--ama-bg-muted);
    margin-bottom: 20px;
}

/* Tabs */
.ama-tab-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--ama-bg-card);
    padding: 8px;
    border-radius: var(--ama-radius-lg);
    border: 2px solid var(--ama-border);
}

.ama-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: var(--ama-radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    color: var(--ama-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.ama-tab-btn:hover {
    background: var(--ama-bg-muted);
    color: var(--ama-text-primary);
}

.ama-tab-btn.active {
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.ama-tab-btn span {
    font-size: 1.2em;
}

/* Tab Content */
.ama-tab-content {
    display: none;
    animation: amaFadeIn 0.3s ease;
}

.ama-tab-content.active {
    display: block;
}

/* Input Groups */
.ama-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ama-input,
.ama-textarea,
.ama-select {
    flex: 1;
    min-width: 250px;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius-md);
    background: var(--ama-bg-card);
    color: var(--ama-text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.ama-input:hover,
.ama-textarea:hover,
.ama-select:hover {
    border-color: var(--ama-primary-light);
}

.ama-input:focus,
.ama-textarea:focus,
.ama-select:focus {
    outline: none;
    border-color: var(--ama-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.ama-textarea {
    min-height: 220px;
    resize: vertical;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    width: 100%;
}

/* Buttons */
.ama-btn {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--ama-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    white-space: nowrap;
}

.ama-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

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

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

.ama-btn-full {
    width: 100%;
    justify-content: center;
}

.ama-btn-primary {
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
}

.ama-btn-secondary {
    background: var(--ama-bg-card);
    color: var(--ama-text-primary);
    border: 2px solid var(--ama-border);
    box-shadow: none;
}

.ama-btn-secondary:hover {
    background: var(--ama-bg-muted);
    border-color: var(--ama-primary);
}

.ama-btn-text {
    background: none;
    color: var(--ama-text-secondary);
    box-shadow: none;
    text-decoration: underline;
    padding: 8px 16px;
}

/* Info Boxes */
.ama-info-box {
    background: var(--ama-info-bg);
    color: var(--ama-info-text);
    padding: 16px 18px;
    border-radius: var(--ama-radius-md);
    border-left: 4px solid var(--ama-info-border);
    font-size: 14px;
    margin-top: 16px;
    line-height: 1.6;
}

.ama-info-box strong {
    font-weight: 600;
}

.ama-info-warning {
    background: var(--ama-warning-bg);
    color: var(--ama-warning-text);
    border-color: var(--ama-warning-border);
}

.ama-info-error {
    background: var(--ama-error-bg);
    color: var(--ama-error-text);
    border-color: var(--ama-error-border);
}

/* Examples */
.ama-examples {
    margin-top: 16px;
}

.ama-example-btn {
    background: var(--ama-bg-card);
    border: 2px solid var(--ama-border);
    padding: 8px 16px;
    border-radius: var(--ama-radius-sm);
    margin: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ama-text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.ama-example-btn:hover {
    border-color: var(--ama-primary);
    background: var(--ama-primary);
    color: white;
}

/* AI Provider Select */
.ama-ai-provider-select {
    margin-bottom: 16px;
}

.ama-ai-provider-select label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--ama-text-primary);
}

/* Loading State */
.ama-loading {
    max-width: 1000px;
    margin: 20px auto;
    text-align: center;
    padding: 80px 30px;
    background: var(--ama-bg-card);
    border-radius: var(--ama-radius-xl);
    box-shadow: var(--ama-shadow-xl);
    display: none;
}

.ama-loading.active {
    display: block;
}

.ama-spinner {
    border: 4px solid var(--ama-border);
    border-top: 4px solid var(--ama-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: amaSpin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes amaSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ama-loading p {
    color: var(--ama-text-secondary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ama-loading-subtext {
    font-size: 14px;
    color: var(--ama-text-tertiary);
}

/* Error Messages */
.ama-error-message {
    max-width: 1000px;
    margin: 20px auto;
    background: var(--ama-error-bg);
    color: var(--ama-error-text);
    padding: 24px;
    border-radius: var(--ama-radius-md);
    border-left: 4px solid var(--ama-error-border);
    display: none;
    animation: amaFadeIn 0.3s ease;
    line-height: 1.6;
}

.ama-error-message.active {
    display: block;
}

/* Results Container */
.ama-results {
    padding: 30px;
    margin-bottom: 20px;
    display: none;
}

.ama-results.active {
    display: block;
}

/* Result Cards */
.ama-result-card {
    background: var(--ama-bg-card);
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    animation: amaFadeIn 0.4s ease;
}

.ama-result-card:hover {
    border-color: var(--ama-primary);
    box-shadow: var(--ama-shadow-lg);
    transform: translateY(-2px);
}

.ama-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.ama-card-title {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--ama-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ama-card-title span {
    font-size: 1.3em;
}

/* Status Badges */
.ama-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    border: 2px solid transparent;
}

.ama-status-success {
    background: var(--ama-success-bg);
    color: var(--ama-success-text);
    border-color: var(--ama-success-border);
}

.ama-status-warning {
    background: var(--ama-warning-bg);
    color: var(--ama-warning-text);
    border-color: var(--ama-warning-border);
}

.ama-status-error {
    background: var(--ama-error-bg);
    color: var(--ama-error-text);
    border-color: var(--ama-error-border);
}

.ama-status-info {
    background: var(--ama-info-bg);
    color: var(--ama-info-text);
    border-color: var(--ama-info-border);
}

/* Meta Content Display */
.ama-meta-content {
    background: var(--ama-bg-muted);
    padding: 16px 18px;
    border-radius: var(--ama-radius-md);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.95em;
    word-break: break-word;
    color: var(--ama-text-primary);
    line-height: 1.6;
    border: 1px solid var(--ama-border);
}

/* Character Count */
.ama-char-count {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.9em;
    color: var(--ama-text-secondary);
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 500;
}

.ama-char-count span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Preview Box */
.ama-preview-box {
    background: var(--ama-bg-card);
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius-md);
    padding: 18px;
    margin-top: 18px;
}

.ama-preview-label {
    font-size: 0.85em;
    color: var(--ama-text-secondary);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ama-preview-title {
    color: #1a0dab;
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 400;
    line-height: 1.3;
}

.ama-dark-mode .ama-preview-title {
    color: #93c5fd;
}

.ama-preview-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 400;
}

.ama-dark-mode .ama-preview-url {
    color: #86efac;
}

.ama-preview-description {
    color: #545454;
    font-size: 14px;
    line-height: 1.58;
}

.ama-dark-mode .ama-preview-description {
    color: var(--ama-text-secondary);
}

/* Suggestions */
.ama-suggestions {
    background: var(--ama-warning-bg);
    color: var(--ama-warning-text);
    padding: 16px 18px;
    border-radius: var(--ama-radius-md);
    margin-top: 18px;
    border-left: 4px solid var(--ama-warning-border);
}

.ama-suggestions h4 {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1em;
}

.ama-suggestions ul {
    margin-left: 20px;
    line-height: 1.8;
}

.ama-suggestions li {
    margin: 6px 0;
}

/* Quick Stats */
.ama-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ama-stat-card {
    background: var(--ama-bg-muted);
    padding: 20px;
    border-radius: var(--ama-radius-md);
    border: 2px solid var(--ama-border);
    text-align: center;
    transition: all 0.3s ease;
}

.ama-stat-card:hover {
    border-color: var(--ama-primary);
    transform: translateY(-2px);
}

.ama-stat-number {
    font-size: 2em;
    font-weight: 700;
    color: var(--ama-primary);
    margin-bottom: 6px;
}

.ama-stat-label {
    font-size: 0.9em;
    color: var(--ama-text-secondary);
    font-weight: 500;
}

/* Section Header */
.ama-section-header {
    font-size: 1.6em;
    font-weight: 700;
    margin: 40px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ama-text-primary);
}

/* JSON-LD Items */
.ama-jsonld-item {
    background: var(--ama-bg-card);
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ama-jsonld-item:hover {
    border-color: var(--ama-primary);
}

.ama-jsonld-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ama-jsonld-header:hover {
    background: var(--ama-bg-muted);
}

.ama-jsonld-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.ama-jsonld-type {
    font-size: 1.2em;
    font-weight: 600;
}

.ama-jsonld-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ama-jsonld-content {
    display: none;
    border-top: 1px solid var(--ama-border);
    background: var(--ama-bg-muted);
    padding: 24px;
}

.ama-jsonld-content.active {
    display: block;
}

.ama-jsonld-content pre {
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    color: var(--ama-text-primary);
    line-height: 1.6;
    padding: 16px;
    background: var(--ama-bg-card);
    border-radius: var(--ama-radius-sm);
    border: 1px solid var(--ama-border);
}

/* Copy Button */
.ama-copy-btn {
    background: var(--ama-bg-card);
    border: 2px solid var(--ama-border);
    color: var(--ama-text-primary);
    padding: 8px 14px;
    border-radius: var(--ama-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.ama-copy-btn:hover {
    background: var(--ama-primary);
    color: white;
    border-color: var(--ama-primary);
}

/* AdSense Containers */
.ama-ad-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: var(--ama-bg-card);
    border-radius: var(--ama-radius-lg);
    box-shadow: var(--ama-shadow-md);
    text-align: center;
}

.ama-ad-label {
    font-size: 11px;
    color: var(--ama-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Modal */
.ama-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: amaFadeIn 0.3s ease;
}

.ama-modal-content {
    background: var(--ama-bg-card);
    padding: 40px 30px;
    border-radius: var(--ama-radius-xl);
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: var(--ama-shadow-xl);
    animation: amaSlideUp 0.3s ease;
}

@keyframes amaSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ama-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--ama-bg-muted);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: var(--ama-text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ama-modal-close:hover {
    background: var(--ama-error-bg);
    color: var(--ama-error-text);
    transform: rotate(90deg);
}

.ama-modal-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.ama-modal-content h2 {
    font-size: 1.8em;
    margin-bottom: 12px;
    color: var(--ama-text-primary);
}

.ama-modal-content p {
    margin-bottom: 24px;
    color: var(--ama-text-secondary);
    line-height: 1.6;
}

.ama-modal-privacy {
    font-size: 0.85em;
    color: var(--ama-text-tertiary);
    margin-top: 16px;
}

/* Share Modal */
.ama-share-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    animation: amaSlideInRight 0.3s ease;
}

@keyframes amaSlideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ama-share-content {
    background: var(--ama-bg-card);
    padding: 24px;
    border-radius: var(--ama-radius-lg);
    box-shadow: var(--ama-shadow-xl);
    border: 2px solid var(--ama-border);
    max-width: 350px;
}

.ama-share-content h3 {
    margin-bottom: 12px;
    color: var(--ama-text-primary);
}

.ama-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.ama-share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--ama-radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ama-share-twitter {
    background: #1DA1F2;
    color: white;
}

.ama-share-linkedin {
    background: #0077B5;
    color: white;
}

.ama-share-facebook {
    background: #4267B2;
    color: white;
}

.ama-share-btn:hover {
    transform: translateX(5px);
    box-shadow: var(--ama-shadow-md);
}

/* Footer SEO Content */
.ama-footer-seo {
    padding: 40px 30px;
    margin-bottom: 20px;
    color: var(--ama-text-primary);
    line-height: 1.8;
}

.ama-footer-seo h2 {
    font-size: 1.8em;
    margin: 30px 0 16px;
    color: var(--ama-text-primary);
}

.ama-footer-seo h3 {
    font-size: 1.4em;
    margin: 24px 0 12px;
    color: var(--ama-text-primary);
}

.ama-footer-seo ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.ama-footer-seo li {
    margin: 8px 0;
}

.ama-footer-seo a {
    color: var(--ama-primary);
    text-decoration: underline;
}

.ama-footer-seo a:hover {
    color: var(--ama-primary-dark);
}

/* Best Practices Grid */
.ama-best-practices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.ama-practice-card {
    background: var(--ama-bg-muted);
    padding: 20px;
    border-radius: var(--ama-radius-md);
    border: 2px solid var(--ama-border);
    transition: all 0.3s ease;
}

.ama-practice-card:hover {
    border-color: var(--ama-primary);
    transform: translateY(-2px);
}

.ama-practice-card h4 {
    margin-bottom: 10px;
    color: var(--ama-text-primary);
}

.ama-practice-card p {
    font-size: 0.95em;
    color: var(--ama-text-secondary);
}

/* FAQ */
.ama-faq {
    margin: 20px 0;
}

.ama-faq-item {
    background: var(--ama-bg-muted);
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius-md);
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.ama-faq-item:hover {
    border-color: var(--ama-primary);
}

.ama-faq-item summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--ama-text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ama-faq-item summary::-webkit-details-marker {
    display: none;
}

.ama-faq-item summary::after {
    content: '+';
    font-size: 1.5em;
    color: var(--ama-primary);
    transition: transform 0.2s ease;
}

.ama-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.ama-faq-item p {
    padding: 0 20px 18px;
    color: var(--ama-text-secondary);
    line-height: 1.6;
}

/* Related Tools */
.ama-related-tools {
    background: var(--ama-bg-muted);
    padding: 24px;
    border-radius: var(--ama-radius-md);
    margin-top: 30px;
}

.ama-related-tools h3 {
    margin-top: 0;
}

/* Comparison Table */
.ama-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--ama-bg-card);
    border-radius: var(--ama-radius-md);
    overflow: hidden;
}

.ama-comparison-table th,
.ama-comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--ama-border);
}

.ama-comparison-table th {
    background: var(--ama-bg-muted);
    font-weight: 600;
    color: var(--ama-text-primary);
}

.ama-comparison-table tr:hover {
    background: var(--ama-bg-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-meta-analyzer-wrapper {
        padding: 10px;
    }

    .ama-header {
        padding: 40px 20px;
        border-radius: var(--ama-radius-lg);
    }

    .ama-header h1 {
        font-size: 1.8em;
    }

    .ama-subtitle {
        font-size: 1em;
    }

    .ama-features {
        flex-direction: column;
        gap: 8px;
    }

    .ama-input-section,
    .ama-results,
    .ama-footer-seo {
        padding: 24px 20px;
        border-radius: var(--ama-radius-lg);
    }

    .ama-tab-buttons {
        flex-direction: column;
        padding: 6px;
    }

    .ama-tab-btn {
        width: 100%;
        min-width: 100%;
    }

    .ama-input-group {
        flex-direction: column;
    }

    .ama-input {
        width: 100%;
        min-width: 100%;
    }

    .ama-result-card {
        padding: 20px;
    }

    .ama-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ama-quick-stats {
        grid-template-columns: 1fr;
    }

    .ama-char-count {
        flex-direction: column;
        gap: 8px;
    }

    .ama-best-practices {
        grid-template-columns: 1fr;
    }

    .ama-share-modal {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .ama-share-content {
        max-width: 100%;
    }

    .ama-modal-content {
        padding: 30px 20px;
    }
}

/* Accessibility */
.ama-btn:focus-visible,
.ama-tab-btn:focus-visible,
.ama-theme-toggle:focus-visible,
.ama-input:focus-visible,
.ama-textarea:focus-visible,
.ama-select:focus-visible {
    outline: 3px solid var(--ama-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ama-header,
    .ama-input-section,
    .ama-ad-container,
    .ama-theme-toggle,
    .ama-modal-overlay,
    .ama-share-modal {
        display: none !important;
    }

    .ama-results {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Loading Skeleton */
@keyframes amaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ama-skeleton {
    animation: amaPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: var(--ama-bg-muted);
    border-radius: var(--ama-radius-sm);
}

/* Scrollbar Styling */
.ama-textarea::-webkit-scrollbar,
.ama-jsonld-content pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ama-textarea::-webkit-scrollbar-track,
.ama-jsonld-content pre::-webkit-scrollbar-track {
    background: var(--ama-bg-muted);
    border-radius: 4px;
}

.ama-textarea::-webkit-scrollbar-thumb,
.ama-jsonld-content pre::-webkit-scrollbar-thumb {
    background: var(--ama-border);
    border-radius: 4px;
}

.ama-textarea::-webkit-scrollbar-thumb:hover,
.ama-jsonld-content pre::-webkit-scrollbar-thumb:hover {
    background: var(--ama-text-tertiary);
}

/* Performance: Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}