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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: #3b82f6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 14px;
    color: #64748b;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Layout */
.main-content {
    padding: 32px 0;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.card-header .icon {
    font-size: 20px;
}

.card-content {
    padding: 20px 24px 24px;
}

/* Tabs */
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-btn:not(.active) {
    color: #64748b;
}

.tab-content {
    display: none;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.input-container {
    position: relative;
}

input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

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

.textarea-container {
    position: relative;
}

.word-count, .char-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    color: #64748b;
    background: rgba(248, 250, 252, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.error {
    color: #ef4444;
}

.char-count.good {
    color: #10b981;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

input:has(+ .input-icon) {
    padding-left: 40px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px dashed #cbd5e1;
    margin-bottom: 16px;
}

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

/* Loading States */
.loading-content {
    text-align: center;
    padding: 40px 20px;
}

.loading-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
}

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

.loading-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}

.loading-content p {
    color: #64748b;
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar .progress-fill {
    width: 45%;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 45%; }
}

/* SEO Score Display */
.score-display {
    text-align: center;
}

.circular-progress {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 8;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.score-label {
    font-size: 12px;
    color: #64748b;
}

.score-status {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

/* Score Breakdown */
.score-breakdown {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.breakdown-item span:first-child {
    font-size: 14px;
    color: #64748b;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar.small {
    width: 64px;
    height: 8px;
}

.breakdown-item span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    min-width: 40px;
    text-align: right;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 20px 16px;
    border-radius: 8px;
}

.stat-item.blue {
    background: #dbeafe;
}

.stat-item.green {
    background: #dcfce7;
}

.stat-item.yellow {
    background: #fef3c7;
}

.stat-item.purple {
    background: #f3e8ff;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-item.blue .stat-number {
    color: #3b82f6;
}

.stat-item.green .stat-number {
    color: #10b981;
}

.stat-item.yellow .stat-number {
    color: #f59e0b;
}

.stat-item.purple .stat-number {
    color: #8b5cf6;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
}

/* Summary Box */
.summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    color: #475569;
    line-height: 1.6;
}

/* Suggestions */
.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid transparent;
}

.suggestion-item.error {
    border-left-color: #ef4444;
}

.suggestion-item.warning {
    border-left-color: #f59e0b;
}

.suggestion-item.info {
    border-left-color: #3b82f6;
}

.suggestion-icon {
    font-size: 16px;
    margin-top: 2px;
}

.suggestion-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.suggestion-content p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.ai-improvements {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.ai-improvements h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.ai-improvements ul {
    list-style: none;
    padding: 0;
}

.ai-improvements li {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.ai-improvements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 32px 20px;
}

.success-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .status {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tabs {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .container {
        padding: 0 16px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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