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

:root {
    --primary: #FF9900;
    --primary-dark: #146EB4;
    --bg: #f5f5f5;
    --card-bg: #fff;
    --text: #111;
    --text-light: #666;
    --border: #e0e0e0;
    --success: #27ae60;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

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

/* Header */
.header {
    background: linear-gradient(135deg, #FF9900 0%, #146EB4 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 60px;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 12px;
    display: inline-block;
}

section h3 {
    font-size: 1.4rem;
    margin-top: 28px;
    margin-bottom: 16px;
    color: var(--primary-dark);
    font-weight: 600;
}

section p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Featured Tool */
.featured-tool {
    background: var(--card-bg);
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.featured-tool h2 {
    margin-bottom: 12px;
}

.featured-tool > .container > p {
    margin-bottom: 24px;
    font-size: 1.05rem;
    color: var(--text-light);
}

.tool-container {
    margin-top: 20px;
}

.tool-input {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.tool-input input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.tool-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

button {
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #e68a00;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

button:active {
    transform: translateY(0);
}

.copy-btn {
    background: var(--success);
    margin-top: 16px;
    width: 100%;
}

.copy-btn:hover {
    background: #229954;
}

#keywordOutput {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

#resultsList {
    margin-bottom: 16px;
}

.keyword-item {
    background: white;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.keyword-item span:first-child {
    flex: 1;
}

.keyword-item span:last-child {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 12px;
    white-space: nowrap;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Best Practices */
.best-practices {
    background: var(--card-bg);
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.best-practices h2 {
    margin-bottom: 30px;
}

.best-practices h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.best-practices p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    section h3 {
        font-size: 1.2rem;
    }

    .tool-input {
        flex-direction: column;
    }

    .tool-input button {
        width: 100%;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* Loading & Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Quick Examples */
.quick-examples {
    margin: 20px 0;
}

.examples-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .example-buttons {
        gap: 6px;
    }

    .example-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
