:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --text: #e4e4e7;
    --text-muted: #71717a;
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --border: #27272a;
    --success: #22c55e;
    --error: #ef4444;
}

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

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

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

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

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

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Tools grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tool-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.tool-card h2 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Tool page layout */
.tool-page {
    max-width: 900px;
    margin: 0 auto;
}

.tool-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tool-page .description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Form elements */
.tool-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1rem;
}

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

textarea, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    resize: vertical;
}

textarea:focus, input:focus {
    outline: none;
    border-color: var(--accent);
}

textarea {
    min-height: 150px;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

button, .btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background: #3f3f46;
}

/* Output */
.output-area {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.output-area.success {
    border-color: var(--success);
}

.output-area.error {
    border-color: var(--error);
    color: var(--error);
}

/* Status messages */
.status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.status.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

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

/* SEO content section */
.seo-content {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.seo-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
}

.seo-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.seo-content ul {
    color: var(--text-muted);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
