/* DevTools - Modern Tool Site */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    background-image: radial-gradient(at top, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    color: var(--text);
    line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text);
    margin-left: 24px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

nav a:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 24px;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
}

/* Main */
main {
    padding: 40px 24px;
}

h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

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

.tool-card .icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.tool-card a.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

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

/* Articles Section */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

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

.article-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.article-card h3 {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 16px 8px;
}

.article-card p {
    padding: 0 16px 16px;
    color: var(--text-light);
    font-size: 14px;
}

/* Footer */
footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0;
}

footer a {
    color: #94a3b8;
    margin: 0 12px;
    font-size: 14px;
}

footer a:hover {
    color: white;
}

/* Tool Page */
.tool-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

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

.tool-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.tool-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.tool-content textarea,
.tool-content input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 16px;
}

.tool-content textarea {
    min-height: 200px;
    resize: vertical;
}

.tool-content .result {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-family: monospace;
    white-space: pre-wrap;
    min-height: 100px;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-group button {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-group button.secondary {
    background: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    header .wrap { flex-direction: column; gap: 12px; }
    nav a { margin: 0 8px; }
    .hero h1 { font-size: 28px; }
    .tools-grid { grid-template-columns: 1fr; }
}
