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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fef6fb 0%, #f0f4ff 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #2d3748;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 18px;
    color: #718096;
    font-weight: 400;
}

.ad-slot {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-placeholder {
    background: linear-gradient(135deg, #e8d5f2 0%, #d5e5f7 100%);
    border: 2px dashed #c7b8d8;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    color: #8b7a9a;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    max-width: 728px;
}

.ad-slot-top {
    margin-bottom: 40px;
}

.ad-slot-middle {
    margin: 50px 0;
}

.ad-slot-bottom {
    margin-top: 50px;
}

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

.input-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.input-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

#textInput {
    width: 100%;
    min-height: 280px;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

#textInput:focus {
    outline: none;
    border-color: #c7b8d8;
    box-shadow: 0 0 0 3px rgba(199, 184, 216, 0.1);
    background: white;
}

.clear-btn {
    margin-top: 16px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f0a8d8 0%, #d6a8f0 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(240, 168, 216, 0.3);
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 168, 216, 0.4);
}

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

.results-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
    text-align: center;
}

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

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

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

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

.insight-card {
    background: white;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.insight-icon {
    font-size: 24px;
}

.insight-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.insight-text {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.7;
}

@media (max-width: 768px) {
    body {
        padding: 24px 16px;
    }

    .header h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .input-card {
        padding: 24px;
    }

    #textInput {
        min-height: 220px;
    }

    .ad-placeholder {
        padding: 40px 20px;
        font-size: 14px;
    }
}

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

    .stat-value {
        font-size: 32px;
    }
}
