:root {
  --bg-color: #f9fafb; --card-bg: #ffffff;
  --text-main: #111827; --text-muted: #6b7280;
  --primary: #4f46e5; --primary-hover: #4338ca; --border: #e5e7eb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-main); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 16px; }
.app-container { background: var(--card-bg); width: 100%; max-width: 550px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); padding: 24px; }
header { text-align: center; margin-bottom: 24px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.icon { font-size: 24px; }
h1 { font-size: 24px; font-weight: 700; color: var(--text-main); }
.subtitle { color: var(--text-muted); font-size: 14px; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; background: #f3f4f6; padding: 4px; border-radius: 8px; }
.tab { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.tab.active { background: white; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Inputs */
input, textarea { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; transition: border 0.2s; margin-bottom: 16px; }
input:focus, textarea:focus { border-color: var(--primary); }
textarea { height: 120px; resize: vertical; }

/* Controls */
.controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
select { padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; background: white; cursor: pointer; }
button { background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
button:hover { background: var(--primary-hover); }
button:disabled { opacity: 0.7; cursor: not-allowed; }

/* Result */
#result-container { margin-top: 20px; padding: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.result-header h3 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; }
#copy-btn { width: auto; padding: 6px 12px; font-size: 12px; background: white; color: var(--primary); border: 1px solid var(--primary); }
#reply-output { font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
#error-box { margin-top: 16px; padding: 12px; background: #fee2e2; color: #b91c1c; border-radius: 8px; font-size: 14px; }
.hidden { display: none !important; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
