:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--bg-color);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px; color: var(--text-main);
}

.overlay {
    position: fixed; inset: 0; background: var(--bg-color);
    display: flex; align-items: center; justify-content: center; z-index: 100;
}

.auth-card, .container {
    background: white; padding: 40px; border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.05); border: 1px solid var(--border);
    width: 100%; max-width: 480px; text-align: center;
}

.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 600; font-size: 24px; color: #000; letter-spacing: -0.5px; }
.subtitle { font-size: 13px; color: var(--text-muted); display: block; margin-top: 4px; }

.input-group { margin-top: 24px; }
input[type="text"], input[type="password"] {
    width: 100%; padding: 14px; border: 1px solid var(--border);
    border-radius: 10px; margin-bottom: 12px; outline: none; font-size: 15px;
    transition: border-color 0.2s;
}
input:focus { border-color: var(--accent); }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }

.btn {
    padding: 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; transition: 0.2s;
}

.btn-primary { background: #000; color: white; }
.btn-primary:hover { opacity: 0.85; }

.settings {
    display: flex; background: #f1f5f9; padding: 15px; border-radius: 10px;
    gap: 15px; align-items: center;
}

.setting-item { flex: 1; text-align: left; }
.setting-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }

.preview-area {
    border: 1px solid var(--border); border-radius: 12px;
    min-height: 260px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 25px; margin: 30px 0;
    background: #fff;
}

#output-container svg { max-width: 100%; height: auto; }

.download-btn {
    margin-top: 20px; display: none; background: var(--accent); border: none;
    color: white; padding: 10px 20px; border-radius: 8px; font-size: 13px; cursor: pointer;
    font-weight: 600;
}

.history-section { text-align: left; border-top: 1px solid var(--border); padding-top: 24px; }
.history-section h3 { font-size: 15px; margin-bottom: 12px; }
.table-wrapper { max-height: 180px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { text-align: left; color: var(--text-muted); padding: 12px; border-bottom: 1px solid var(--border); background: #f8fafc; }
td { padding: 12px; border-bottom: 1px solid #f1f5f9; color: #475569; }

.toggle-btn { background: none; border: none; color: var(--accent); cursor: pointer; margin-top: 15px; font-size: 13px; }
.logout-link { color: #ef4444; background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 600; }
.clear-btn { margin-top: 15px; background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 11px; text-decoration: underline; }
footer { margin-top: 40px; font-size: 11px; color: #94a3b8; }
