/* ===== সাইটের ফন্ট: /fonts/RAU.ttf (সবখানে একই) =====
   ফন্টে কোনো অক্ষর না থাকলে (যেমন আরবি হারাকাত) শুধু সেই অক্ষর পরের ফন্ট থেকে আসবে */
@font-face {
    font-family: 'RAU';
    src: url('../fonts/RAU.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
    --font-main:   'RAU', 'Noto Sans Bengali', 'Amiri', 'Segoe UI', Tahoma, sans-serif;
    --font-arabic: 'RAU', 'Amiri', 'Noto Naskh Arabic', serif;
}
button, input, select, textarea { font-family: inherit; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    overflow-x: hidden;
    background-color: #000;
}

.background-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('../assets/home-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.arabic-letters {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-letter {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.main-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
}

.title {
    margin-bottom: 3rem;
}

.title h2 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.title p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.auth-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: #ffd700;
}

.card-header h3 {
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

.btn:hover {
    background: linear-gradient(45deg, #ffed4e, #ffd700);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.toggle-text {
    margin-top: 1.5rem;
    text-align: center;
    opacity: 0.9;
}

.toggle-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

.toggle-link:hover {
    text-decoration: underline;
}


/* ================= ধাপ ১-এ যোগ করা অংশ ================= */

/* আরবি টেক্সটের ফন্ট */
.arabic, .title h2, .arabic-text { font-family: var(--font-arabic); }
.title h2 { line-height: 1.6; }

/* ফর্ম মেসেজ (আগে ডিফাইন করা ছিল না) */
.error-message, .success-message {
    text-align: left;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.error-message   { background: rgba(244, 67, 54, 0.25);  border: 1px solid rgba(244, 67, 54, 0.6); }
.success-message { background: rgba(76, 175, 80, 0.25);  border: 1px solid rgba(76, 175, 80, 0.6); }
.error-message p + p { margin-top: 0.3rem; }

/* কিবোর্ড ফোকাস দেখা যাবে */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* যারা অ্যানিমেশন কমাতে চান */
@media (prefers-reduced-motion: reduce) {
    .floating-letter { animation: none; opacity: 0.15 !important; }
    .btn, .story-card { transition: none; }
}

/* ---------- ড্যাশবোর্ড ---------- */
.main-content.wide { max-width: 1400px; }
.main-content.wide .title { margin-bottom: 1.5rem; }
.title.compact h2 { font-size: 2.2rem; margin-bottom: 0.3rem; }
.title.compact p  { font-size: 1rem; }

.dashboard-container { width: 100%; margin: 0 auto; padding: 1rem 2rem 2rem; }
@media (min-width: 992px) { .dashboard-container { width: 85%; } }
@media (max-width: 767px) { .dashboard-container { padding: 0.5rem 0.5rem 2rem; } }

.user-welcome {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}
.user-welcome h3 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #ffd700; }
.user-welcome p  { font-size: 1.1rem; opacity: 0.9; }

.stats-row { display: flex; justify-content: center; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.stat { font-size: 1rem; }
.stat strong { color: #ffd700; font-size: 1.3rem; margin-right: 0.3rem; }

.progress-section { margin-bottom: 2rem; text-align: left; }
.progress-section h4 { font-size: 1.4rem; margin-bottom: 1rem; color: #ffd700; }
.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.progress {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    height: 100%;
    min-width: max-content;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: #333;
    font-weight: bold;
    transition: width 0.5s ease;
}

.stage-heading { text-align: left; color: #ffd700; font-size: 1.3rem; margin: 1.5rem 0 1rem; }
.level-heading { text-align: left; font-size: 1.6rem; margin: 2rem 0 0.5rem; }

.stories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 1rem; }
@media (min-width: 768px) and (max-width: 991px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .stories-grid { grid-template-columns: 1fr; } }

.story-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.story-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.story-card .story-no { font-size: 0.9rem; opacity: 0.8; }
.story-card h5 { font-size: 1.25rem; margin: 0.3rem 0 0.5rem; color: #ffd700; }
.story-card p  { font-size: 0.95rem; margin-bottom: 1rem; opacity: 0.9; }
.story-card .btn { margin-top: 0; }

.story-card.completed { background: rgba(76, 175, 80, 0.2);  border-color: rgba(76, 175, 80, 0.5); }
.story-card.open      { border-color: rgba(255, 215, 0, 0.7); }
.story-card.locked    { background: rgba(244, 67, 54, 0.15); border-color: rgba(244, 67, 54, 0.4); }
.story-card.soon      { opacity: 0.6; }
.story-card .status-text { font-weight: bold; }
.story-card.locked .status-text { color: #ff8a80; }

.logout-section { text-align: center; margin-top: 2rem; }
.logout-btn {
    display: inline-block;
    width: auto;
    background: linear-gradient(45deg, #f44336, #ff5252);
    color: #fff;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
}
.logout-btn:hover { background: linear-gradient(45deg, #ff5252, #f44336); box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4); }

/* ---------- স্টোরি পেজ (ধাপ ২-এ বাড়বে) ---------- */
.story-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}
.back-link { display: inline-block; margin-bottom: 1rem; color: #ffd700; text-decoration: none; font-weight: bold; }
.back-link:hover { text-decoration: underline; }
body.story-bg .background-container { background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../assets/storybg-1.jpg'); }

/* ---------- দৈনিক লক্ষ্য (ড্যাশবোর্ড) ---------- */
.goal-card { display: flex; gap: 1.5rem; align-items: center; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 15px; padding: 1.2rem 1.5rem; margin-bottom: 2rem; text-align: left; }
.goal-ring { position: relative; flex: 0 0 104px; width: 104px; height: 104px; }
.goal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 9; }
.ring-fg { fill: none; stroke: #ffd700; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.ring-fg.done { stroke: #66bb6a; }
.ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; }
.goal-info { flex: 1; min-width: 0; }
.goal-info h4 { color: #ffd700; font-size: 1.25rem; margin-bottom: 0.2rem; }
.goal-msg { font-size: 0.98rem; opacity: 0.95; margin-bottom: 0.7rem; }
.goal-msg.done { color: #a5d6a7; font-weight: bold; }
.week-row { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.week-day .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.week-day.met .dot { background: #66bb6a; border-color: #66bb6a; color: #fff; }
.week-day.today .dot { border-color: #ffd700; box-shadow: 0 0 0 2px rgba(255,215,0,0.35); }
.week-day.future { opacity: 0.45; }
.wd-label { font-size: 0.72rem; opacity: 0.9; }
.goal-choose { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.gc-title { font-size: 0.85rem; opacity: 0.85; margin-right: 0.2rem; }
.gc-btn { font: inherit; font-size: 0.82rem; color: #fff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.35); border-radius: 50px; padding: 0.3rem 0.8rem; cursor: pointer; }
.gc-btn:hover { background: rgba(255,255,255,0.22); }
.gc-btn.active { background: rgba(255,215,0,0.3); border-color: #ffd700; font-weight: bold; }
@media (max-width: 560px) { .goal-card { flex-direction: column; text-align: center; } .week-row, .goal-choose { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .ring-fg { transition: none; } }
