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

body {
    background: #f7f9fc;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #1e293b;
}

.card {
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.15);
    padding: 2.5rem 2rem;
    transition: 0.2s;
}

h1 {
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

h1 span {
    background: #0b1e33;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.1rem 0.8rem;
    border-radius: 40px;
    margin-left: 0.5rem;
    letter-spacing: 0.3px;
}

.sub {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

@media (max-width: 700px) {
    .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    }
    .card {
    padding: 1.8rem 1.2rem;
    }
}

.panel {
    background: #f8fafc;
    border-radius: 1.2rem;
    padding: 1.2rem 1rem 1rem;
    border: 1px solid #e9edf2;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.2rem;
}

.panel-header label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    background: #dbeafe;
    color: #1e4d8c;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-out {
    background: #e6f7e6;
    color: #1e6b3b;
}

textarea {
    width: 100%;
    min-height: 320px;
    background: white;
    border: 1px solid #dde3ea;
    border-radius: 0.9rem;
    padding: 1rem;
    font-family: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    color: #0b1e33;
    transition: 0.15s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    flex: 1;
}

textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: transparent;
}

.textarea-output {
    background: #f1f5f9;
    color: #0b1e33;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.2rem;
    gap: 0.6rem;
}

.btn-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn {
    background: white;
    border: 1px solid #d0d8e3;
    padding: 0.6rem 1.4rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    background: #ffffff;
}

.btn-primary {
    background: #0b1e33;
    border: 1px solid #0b1e33;
    color: white;
    box-shadow: 0 4px 8px -4px rgba(11,30,51,0.25);
}

.btn-primary:hover {
    background: #1a314b;
    border-color: #1a314b;
    transform: scale(1.01);
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn:active {
    transform: scale(0.97);
}

.stats {
    font-size: 0.8rem;
    color: #64748b;
    background: #f1f4f9;
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.stats span {
    font-weight: 600;
    color: #0b1e33;
}

.copy-feedback {
    font-size: 0.8rem;
    color: #15803d;
    background: #dcfce7;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
}

.copy-feedback.show {
    opacity: 1;
}

.footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e9edf2;
    padding-top: 1.2rem;
    letter-spacing: 0.2px;
}

.footer > * {
    margin-left: 0.6rem;
}

.footer a {
    color: #3b82f6;
    text-decoration: none;
}

.footer code {
    background: #eef2f6;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

