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

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --primary-dark: #020617;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --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);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease
}

html {
    scroll-behavior: smooth
}

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

a {
    text-decoration: none;
    transition: var(--transition)
}

img {
    max-width: 100%;
    height: auto
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition)
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md)
}

.btn-secondary {
    background: var(--bg-dark);
    color: var(--text);
    border: 1px solid var(--border)
}

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

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

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

header {
    background: var(--primary);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff
}

.logo:hover {
    color: #fff
}

.logo img {
    height: 40px;
    width: auto
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px
}

nav a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius);
    transition: var(--transition)
}

header nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1)
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: var(--radius)
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1)
}

footer {
    background: var(--primary);
    color: #fff;
    padding: 64px 0 24px
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 48px
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.footer-brand .logo {
    font-size: 1.125rem
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 340px
}

.footer-links h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5)
}

.footer-links ul {
    list-style: none
}

.footer-links li {
    margin-bottom: 12px
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    transition: var(--transition)
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem
}

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible
}

.back-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-4px)
}

.tool-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 40px 0
}

.tool-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px
}

.tool-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border)
}

.tool-input {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    transition: var(--transition)
}

.tool-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1)
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap
}

.result-item {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px
}

.result-item:last-child {
    margin-bottom: 0
}

.result-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary)
}

.page-hero {
    background: var(--primary);
    color: #fff;
    padding: 48px 0;
    position: relative
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(16, 185, 129, 0.1) 100%)
}

.page-hero .container {
    position: relative;
    z-index: 1
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px
}

.page-hero p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    font-size: 0.875rem;
    color: var(--text-light)
}

.breadcrumb a {
    color: var(--accent)
}

.breadcrumb span {
    color: var(--text-muted)
}

.tutorial-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 24px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius)
}

.tutorial-link:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-dark)
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600
}

.status-good {
    background: #d1fae5;
    color: #065f46
}

.status-warning {
    background: #fef3c7;
    color: #92400e
}

.status-error {
    background: #fee2e2;
    color: #991b1b
}

@media (max-width:992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px
    }
}

@media (max-width:768px) {
    .mobile-menu-btn {
        display: flex
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-light);
        padding: 16px 24px;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        border-top: 1px solid rgba(255, 255, 255, 0.1)
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible
    }

    nav ul {
        flex-direction: column;
        gap: 4px
    }

    nav a {
        display: block;
        padding: 12px 16px
    }

    .tool-layout {
        grid-template-columns: 1fr
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center
    }

    .footer-brand {
        align-items: center
    }

    .footer-brand p {
        max-width: 100%
    }

    .page-hero h1 {
        font-size: 1.5rem
    }

    .page-hero p {
        font-size: 0.95rem
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px
    }
}