@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
}

* { box-sizing: border-box; outline: none; }

body {
    background: var(--bg);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
}

.card, .history-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

h1 { margin: 0 0 10px; color: var(--primary); }
p { margin: 0 0 20px; color: var(--text-light); font-size: 0.9rem; }

.input-group { margin-bottom: 20px; }

input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: 0.3s;
    text-align: left;
    direction: ltr;
}

input:focus { border-color: var(--primary); }

button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover { background: var(--primary-hover); }
button:disabled { background: #cbd5e1; cursor: not-allowed; }

.hidden { display: none !important; }

/* Progress Bar */
.status-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-bg {
    background: #e5e7eb;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.btn-success {
    display: block;
    background: #10b981;
    color: white;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
}

/* History List */
h3 { margin-top: 0; font-size: 1.1rem; text-align: right; }
ul { list-style: none; padding: 0; margin: 0; text-align: right; }
li {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
li:last-child { border-bottom: none; }
li a { color: var(--primary); text-decoration: none; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 70%; direction: ltr; display: inline-block;}
li small { color: #9ca3af; font-size: 0.75rem; }