/* =========================
   Local Font
========================= */

@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Medium.woff2") format("woff2");
font-weight: 500;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: "Vazirmatn";
src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}

:root {

--bg-color: #0f172a;

--card-bg: rgba(30, 41, 59, 0.7);

--border-color: rgba(255, 255, 255, 0.08);

--primary: #3b82f6;

--primary-hover: #2563eb;

--secondary: #10b981;

--text-main: #f8fafc;

--text-muted: #94a3b8;

--danger: #ef4444;

--radius: 16px;

--font: "Vazirmatn", system-ui, -apple-system, sans-serif;

}

/* =========================
   Base Reset
========================= */

*,
*::before,
*::after {

box-sizing: border-box;

outline: none;

-webkit-tap-highlight-color: transparent;

}

body {

margin: 0;

font-family: var(--font);

background: var(--bg-color);

color: var(--text-main);

min-height: 100vh;

display: flex;

justify-content: center;

padding: 20px 10px;

text-rendering: optimizeLegibility;

-webkit-font-smoothing: antialiased;

}

.app-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 70%);
    z-index: -1;
}
.main-container {
    width: 100%;
    max-width: 550px;
}
.header { text-align: center; margin-bottom: 2rem; }
.header h1 { margin: 0; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.badge { background: var(--primary); font-size: 0.7rem; padding: 2px 8px; border-radius: 12px; vertical-align: middle; }
.header p { color: var(--text-muted); margin: 5px 0 0; font-size: 0.9rem; }
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.form-group { margin-bottom: 1.5rem; }
label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; color: var(--text-muted); }
.input-wrapper { position: relative; }
textarea, input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
textarea:focus, input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.action-btn-icon {
    position: absolute;
    left: 10px;
    top: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
}
.action-btn-icon:hover { color: var(--text-main); transform: scale(1.1); }
input + .action-btn-icon { top: 50%; transform: translateY(-50%); }
input + .action-btn-icon:hover { transform: translateY(-50%) scale(1.1); }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.btn {
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: transform 0.1s, filter 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: var(--text-main); border: 1px solid var(--border-color); }
.btn:hover { filter: brightness(1.15); }
.tools-bar { display: flex; justify-content: space-between; margin: 1rem 0; padding: 0 5px; }
.tool-link { background: none; border: none; color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: 0.85rem; }
.tool-link:hover { text-decoration: underline; }
.text-danger { color: var(--danger); }
.copy-fab {
    position: absolute;
    bottom: 15px; left: 15px;
    width: 45px; height: 45px;
    border-radius: 50%;
    background: var(--secondary);
    border: none;
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: 0.3s;
}
.copy-fab:hover { transform: translateY(-3px) rotate(-5deg); box-shadow: 0 6px 15px rgba(16, 185, 129, 0.5); }
#toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; width: 90%; max-width: 350px; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    border-right: 4px solid var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    font-size: 0.9rem;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.success { border-right-color: var(--secondary); }
.toast.error { border-right-color: var(--danger); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }
.debug-box { margin-top: 20px; padding: 10px; background: #000; border-radius: 8px; color: #ff5555; font-family: monospace; font-size: 0.7rem; white-space: pre-wrap; direction: ltr; }
