:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --secondary: #28a745;
    --secondary-dark: #218838;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.input-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

input[type="number"] {
    width: 200px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

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

.btn-icon {
    font-size: 18px;
}

.loading {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.result {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px var(--shadow);
}

.result h2 {
    margin-bottom: 25px;
    color: var(--primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    opacity: 0.9;
}

.engagement-rate {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-radius: 12px;
    margin-bottom: 30px;
}

.engagement-rate .label {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-right: 10px;
}

.engagement-rate .rate {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.features-section,
.suggestions-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.features-section h3,
.suggestions-section h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.feature-badge.positive {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.feature-badge.negative {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.suggestions-list {
    list-style: none;
    padding: 0;
}

.suggestions-list li {
    padding: 15px;
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 2px 4px var(--shadow);
}

.small-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

.small-btn:hover {
    opacity: 0.95;
}

.tag-btn {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
}

.improved-hook {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-top: 10px;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--text-light);
    font-size: 14px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 15px;
    }

    .input-section {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

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

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}