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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fafb;
}

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

/* NAVBAR */
.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #6b7280;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2563eb;
}

/* BUTTONS */
.btn-primary, .btn-secondary, .btn-large, .btn-small {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #333;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 4rem 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero .subsubtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.hero .btn-large {
    background: white;
    color: #2563eb;
}

.hero .btn-large:hover {
    background: #f3f4f6;
}

/* FEATURES */
.features {
    padding: 4rem 20px;
    background: white;
}

.features h2, .how-it-works h2, .pricing h2, .examples h2, .faq h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

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

.card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.card p {
    color: #6b7280;
}

/* HOW IT WORKS */
.how-it-works {
    padding: 4rem 20px;
}

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

.step {
    text-align: center;
}

.step-num {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 3rem;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.step p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* PRICING */
.pricing {
    padding: 4rem 20px;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}

.pricing-card.featured {
    border-color: #2563eb;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.one-time {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: #6b7280;
}

/* EXAMPLES */
.examples {
    padding: 4rem 20px;
}

.example {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.example h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #1f2937;
}

.prompt-text {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border-left: 4px solid #2563eb;
}

.score {
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.issues {
    color: #6b7280;
    font-size: 0.9rem;
}

/* FAQ */
.faq {
    padding: 4rem 20px;
    background: white;
}

.faq-item {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.faq-item p {
    color: #6b7280;
}

/* FOOTER */
footer {
    background: #1f2937;
    color: white;
    padding: 2rem 20px;
    text-align: center;
}

footer a {
    color: #60a5fa;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* APP CONTAINER */
.app-container {
    padding: 2rem 20px;
    min-height: 80vh;
}

.app-container .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.analyzer {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.input-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.input-section h2 {
    margin-bottom: 1rem;
    color: #1f2937;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    margin-bottom: 1rem;
}

textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* RESULTS */
.results-section {
    padding: 2rem;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.score-header h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 0;
}

.overall-score {
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.score-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2563eb;
}

/* SCORE GRID */
.criteria-scores {
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.criteria-scores h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1rem;
}

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

.score-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.score-item .score-label {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    display: block;
}

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

.score-fill {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    transition: width 0.3s;
}

/* RECOMMENDATIONS */
.recommendations {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.recommendations h3 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.recommendation-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.recommendation-item strong {
    color: #1f2937;
    display: block;
    margin-bottom: 0.25rem;
}

.recommendation-item p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* REWRITE SECTION */
#rewriteSection {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

#rewriteSection h3 {
    color: #15803d;
    margin-bottom: 1rem;
}

.code-box {
    background: #1f2937;
    color: #10b981;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* EMPTY STATE */
.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.hint {
    font-size: 0.9rem;
    color: #d1d5db;
}

/* SIDEBAR */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tip-box, .templates-box {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.tip-box h3, .templates-box h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1rem;
}

.tip-box ul {
    list-style: none;
}

.tip-box li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.tip-box strong {
    color: #1f2937;
}

.template-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #2563eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.template-btn:hover {
    background: #f3f4f6;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .app-container .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .score-header {
        flex-direction: column;
        gap: 1rem;
    }

    .score-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}
