/* ClawdSkills - Clean, minimal CSS */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --success-bg: #dcfce7;
    --failure: #ef4444;
    --failure-bg: #fee2e2;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    margin-left: 2rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Search */
.search-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 999px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.tag:hover {
    background: var(--primary-dark);
}

.tag.small {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
}

.tag.selected {
    background: var(--primary-dark);
    box-shadow: 0 0 0 2px var(--primary);
}

.tag-btn {
    border: none;
    cursor: pointer;
}

/* Sections */
section {
    margin: 2rem 0;
}

section h2 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Solution cards */
.solutions-list {
    display: grid;
    gap: 1rem;
}

.solution-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.solution-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.solution-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.solution-title:hover {
    color: var(--primary);
}

.solution-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.solution-url {
    margin-top: 0.5rem;
}

.solution-url a {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Votes */
.votes {
    font-weight: 600;
    font-size: 0.875rem;
}

.votes.success {
    color: var(--success);
}

.votes.failure {
    color: var(--failure);
}

.votes.large {
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

.votes.success.large {
    background: var(--success-bg);
}

.votes.failure.large {
    background: var(--failure-bg);
}

/* Status */
.status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    text-transform: uppercase;
}

.status.active {
    background: var(--success-bg);
    color: var(--success);
}

.status.dead_link {
    background: var(--failure-bg);
    color: var(--failure);
}

.status.deprecated {
    background: #fef3c7;
    color: #d97706;
}

/* Tools */
.tools {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.tools code,
.tool {
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Stats */
.stats-summary {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
}

.stat-box {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Stats page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card.success {
    border-color: var(--success);
}

.stat-card.failure {
    border-color: var(--failure);
}

.stat-card .stat-number {
    font-size: 2.5rem;
}

/* Tag chart */
.tag-chart {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.tag-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tag-bar .tag-name {
    width: 120px;
    color: var(--text);
    text-decoration: none;
}

.tag-bar .tag-name:hover {
    color: var(--primary);
}

.tag-bar .bar {
    background: var(--primary);
    height: 24px;
    border-radius: 4px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

.tag-bar .count {
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
}

/* API table */
.api-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.api-table th,
.api-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.api-table th {
    background: var(--bg);
    font-weight: 600;
}

.api-table code {
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.existing-tags {
    margin-top: 0.5rem;
}

.existing-tags span {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* Vote form */
.vote-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.vote-buttons {
    display: flex;
    gap: 1rem;
}

.vote-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.vote-option.success:hover,
.vote-option.success:has(input:checked) {
    border-color: var(--success);
    background: var(--success-bg);
}

.vote-option.failure:hover,
.vote-option.failure:has(input:checked) {
    border-color: var(--failure);
    background: var(--failure-bg);
}

/* Solution detail */
.solution-detail header {
    margin-bottom: 2rem;
}

.solution-detail h1 {
    margin-bottom: 1rem;
}

.detail-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.detail-section h2 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.skill-link {
    color: var(--primary);
    word-break: break-all;
}

.hash code {
    font-size: 0.75rem;
    word-break: break-all;
}

.metadata {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.metadata dt {
    color: var(--text-light);
}

.metadata dd code {
    font-size: 0.75rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert.error {
    background: var(--failure-bg);
    color: var(--failure);
    border: 1px solid var(--failure);
}

.alert.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Empty state */
.empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem;
}

.empty a {
    color: var(--primary);
}

/* Search header */
.search-header {
    margin-bottom: 2rem;
}

.search-header h1 {
    margin-bottom: 1rem;
}

.filter-tags {
    margin-top: 1rem;
}

.filter-tags span {
    color: var(--text-light);
    margin-right: 0.5rem;
}

.results-count {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

footer a {
    color: var(--text-light);
    margin: 0 0.5rem;
}

footer a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links a {
        margin-left: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .stats-summary {
        flex-wrap: wrap;
    }
    
    .vote-buttons {
        flex-direction: column;
    }
}

/* About page */
.about-page {
    max-width: 700px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.about-section:last-child {
    border-bottom: none;
}

.about-section h2 {
    color: #4F46E5;
    margin-bottom: 1rem;
}

.about-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.about-section li {
    margin-bottom: 0.5rem;
}

.about-section code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.about-section .button {
    display: inline-block;
    background: #4F46E5;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 0.5rem;
}

.about-section .button:hover {
    background: #4338CA;
}
