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

:root {
    /* Modern Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent-color: #ec4899;
    --accent-light: #f472b6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --link-color: #3b82f6;
    --link-hover: #2563eb;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --code-bg: #f1f5f9;
    --border-color: #e5e7eb;
    --border-light: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --radius-sm: 2px;
    --radius-md: 3px;
    --radius-lg: 4px;
    --radius-xl: 6px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 0.75em;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--text-color);
}

h3 {
    font-size: 1.5em;
    margin-top: 1.5em;
    color: var(--text-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

code {
    background-color: var(--code-bg);
    padding: 0.25em 0.5em;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

/* Header and Navigation */
header {
    background: #2563eb;
    color: white;
    padding: 0.875rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    font-size: 1.5em;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header h1 a {
    color: white;
}

header h1 a:hover {
    color: white;
    text-decoration: none;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: white;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.section {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.section h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25em;
    margin-bottom: 0.75rem;
}

.section h2::before {
    content: '';
    width: 3px;
    height: 1.2em;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Tools Lists */
.tools-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tools-list li {
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.tools-list li.tool-item {
    cursor: pointer;
}

.tools-list li:hover {
    background: var(--bg-tertiary);
}

.tool-name {
    font-weight: 600;
    color: var(--primary-color);
}

.tools-list li.tool-item:hover .tool-name {
    color: var(--primary-hover);
    text-decoration: underline;
}

.tool-description {
    color: var(--text-secondary);
    margin-left: 0.5em;
    font-size: 0.95em;
}

.tool-date {
    color: var(--text-muted);
    font-size: 0.8em;
    margin-left: 0.5em;
}

/* Category Sections */
.category-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.category-section h3 {
    color: var(--text-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1em;
}

.tool-count {
    color: var(--text-muted);
    font-size: 0.8em;
    font-weight: 500;
}

/* Search */
.search-container {
    position: relative;
}

#search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-results {
    margin-top: 1rem;
}

#search-results .tool-category {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.no-results {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

/* Timeline */
.timeline-month {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.timeline-month h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95em;
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}

footer p {
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Page Styles */
.tool-header {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tool-header h1 {
    margin-bottom: 0.25em;
    color: var(--text-color);
}

.tool-meta {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.tool-interface {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.25rem 0;
    box-shadow: var(--shadow-sm);
}

.tool-interface h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.15em;
}

.tool-interface textarea,
.tool-interface input[type="text"],
.tool-interface input[type="datetime-local"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875em;
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
}

.tool-interface textarea:focus,
.tool-interface input[type="text"]:focus,
.tool-interface input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

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

.tool-interface button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
}

.tool-interface button:hover {
    background: var(--primary-hover);
}

.output {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-top: 0.75rem;
    min-height: 80px;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875em;
    line-height: 1.5;
    color: var(--text-color);
}

#current-time {
    background: #f0fdf4;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid #86efac;
}

#current-time strong {
    color: #166534;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container,
    .nav-container {
        padding: 1.5rem 1rem;
    }

    .section {
        padding: 1.5rem;
        border-radius: 4px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.65em;
    }

    h3 {
        font-size: 1.35em;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .nav-links {
        gap: 1rem;
        width: 100%;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9em;
    }

    .tools-list li {
        padding: 0.875rem 1rem;
        padding-left: 2.5rem;
    }

    .tool-interface {
        padding: 1.5rem;
    }

    .tool-header {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--primary-light);
    color: white;
}
