/* GoodBoog Tools - Unified CSS (Minified for PageSpeed 100%) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --primary: #004084;
    --text: #333;
    --bg: #f8f9fa;
    --border: #e0e0e0
}

body {
    font: 16px/1.5 system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    max-width: 100%
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2
}

h1 {
    font-size: 2rem
}

h2 {
    font-size: 1.75rem;
    margin-top: 3rem
}

h3 {
    margin-top: 1.5rem
}

section.content-section {
    margin-bottom: 3rem
}

section.content-section h2 {
    margin-top: 3rem
}

section.content-section:first-of-type h2 {
    margin-top: 2rem
}

p {
    margin-bottom: 1rem
}

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

a:hover {
    text-decoration: underline
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    position: sticky;
    top: 0;
    z-index: 1000
}

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

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

.nav-tools {
    display: flex;
    gap: 1rem
}

.nav-tools a {
    color: var(--text);
    padding: .5rem 1rem;
    border-radius: 4px
}

.nav-tools a:hover,
.nav-tools a.active {
    background: #f0f0f0;
    text-decoration: none
}

.nav-dropdown {
    position: relative
}

.dropdown-toggle {
    background: 0 0;
    border: 0;
    padding: .5rem 1rem;
    cursor: pointer;
    color: var(--text);
    font: inherit
}

.dropdown-toggle:after {
    content: '▼';
    margin-left: .5rem;
    font-size: .8em
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    border-radius: 4px;
    padding: 1rem;
    min-width: 300px;
    z-index: 1000
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.dropdown-group {
    padding: .5rem
}

.dropdown-group h3 {
    color: #666;
    font-size: .9rem;
    text-transform: uppercase;
    margin: 0 0 .5rem
}

.dropdown-group a {
    display: block;
    color: var(--text);
    padding: .5rem;
    border-radius: 4px
}

.dropdown-group a:hover {
    background: #f0f0f0;
    text-decoration: none
}

.content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1rem
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05)
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem
}

.hero p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem
}

.tool-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    margin-bottom: 2rem
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0
}

.tool-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s
}

.tool-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1)
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem
}

button,
.btn {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: .75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s
}

button:hover,
.btn:hover {
    background: #003570
}

.generator {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    margin-bottom: 2rem
}

.generator select,
.generator input {
    margin-bottom: 1rem
}

.generator button {
    width: auto;
    min-width: 180px
}

.generator .button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem
}

.generator #qrcode {
    margin: 1.5rem 0;
    text-align: center;
    min-height: 50px
}

input,
select,
textarea {
    width: 100%;
    padding: .75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1rem
}

label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600
}

.result-box {
    background: #f0f7ff;
    border: 2px solid var(--primary);
    border-radius: 4px;
    padding: 1.5rem;
    margin: 1rem 0;
    word-break: break-all
}

footer {
    margin-top: 4rem;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    background: #fff
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap
}

.footer-links a {
    color: var(--text)
}

.language-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem
}

.language-selector a {
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px
}

.language-selector a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary)
}

table.conversion-reference {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
    overflow-x: auto
}

table.conversion-reference thead,
table.conversion-reference tbody,
table.conversion-reference tr {
    display: table;
    width: 100%;
    table-layout: fixed
}

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

table.conversion-reference thead th {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--primary)
}

table.conversion-reference tbody tr:hover {
    background: #f5f8fa
}

table.conversion-reference td:nth-child(3) {
    font-family: 'Courier New', monospace;
    color: #666;
    text-align: right
}

table.conversion-reference th:nth-child(1),
table.conversion-reference td:nth-child(1) {
    width: 25%
}

table.conversion-reference th:nth-child(2),
table.conversion-reference td:nth-child(2) {
    width: 25%
}

table.conversion-reference th:nth-child(3),
table.conversion-reference td:nth-child(3) {
    width: 20%
}

table.conversion-reference th:nth-child(4),
table.conversion-reference td:nth-child(4) {
    width: 30%
}

@media (max-width:768px) {
    .main-nav {
        flex-wrap: wrap
    }

    .nav-tools {
        width: 100%;
        margin-top: .5rem;
        justify-content: center
    }

    .hero h1 {
        font-size: 1.75rem
    }

    .hero p {
        font-size: 1rem
    }

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

    .dropdown-menu {
        left: auto;
        right: 0
    }
}

.nav-brand img {
    height: 23px;
    width: auto
}

.hero-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0
}

.hero-features li {
    color: #28a745;
    font-weight: 500
}

.lang-switch {
    display: flex;
    gap: .5rem
}

.lang-switch a {
    padding: .25rem .5rem;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    transition: all .2s
}

.lang-switch a:hover {
    background: #f0f0f0;
    color: #007bff
}

.lang-switch a.active,
.lang-switch a[aria-current="page"] {
    background: #007bff !important;
    color: #fff !important;
    font-weight: 600
}