* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 0 0 2rem;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(14px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.brand-title {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.brand-tag {
    color: #dc2626;
    text-shadow: 0 1px 0 rgba(220, 38, 38, 0.12);
}

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

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: #475569;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.hero {
    display: grid;
    gap: 2.5rem;
    padding: 4rem 0 2.5rem;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 1rem;
    color: #2563eb;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1.04;
}

.hero p {
    margin: 1.5rem 0 0;
    max-width: 720px;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-actions {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tool-card {
    display: block;
    padding: 1.9rem 1.6rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    color: inherit;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.12);
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.tool-card.highlight {
    border-color: #dbeafe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.tool-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.2rem;
}

.tool-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.tool-page {
    padding: 3rem 0;
}

.tool-panel {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.tool-panel h1 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
}

.tool-panel p {
    margin: 0 0 2rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
}

.tool-form {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: grid;
    gap: 0.65rem;
}

.form-group label {
    font-weight: 700;
    color: #111827;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;

    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;

    /* Space for arrow */
    padding-right: 3rem;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 3.2rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="file"] {
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.25);
}

.form-group select:hover {
    border-color: #93c5fd;
}

.form-group select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-note {
    margin: 0 0 1rem;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.primary-button {
    width: 100%;
    padding: 1rem 1.2rem;
    border: none;
    border-radius: 16px;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.primary-button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.85;
    cursor: not-allowed;
}

.primary-button .button-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.primary-button.loading {
    pointer-events: none;
}

.primary-button.loading .button-label {
    opacity: 0.4;
}

.primary-button.loading .button-spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    margin-top: 0.8rem;
    min-height: 1.3rem;
    color: #dc2626;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer {
    background: transparent;
}

.footer .container {
    padding: 1.5rem 0;
    text-align: center;
}

.footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.footer-copyright {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.footer-links {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #2563eb;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.footer-separator {
    color: #d1d5db;
}

.footer-credit {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

/* Legal Pages Styling */
.legal-page {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
}

.legal-page h1 {
    font-size: 2.2rem;
    color: #0f172a;
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page p {
    color: #334155;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-page ul {
    color: #334155;
    line-height: 1.8;
    margin: 1rem 0 1rem 2rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 3rem 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: 95%;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tool-panel {
        padding: 2rem;
    }

    .tool-card {
        padding: 1.7rem;
    }
}
