/* --- বেসিক ইমপোর্ট এবং ফন্ট --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Kalpurush:wght@400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #e9f5db, #dcedc8, #b2dfdb, #c5cae9);
    --text-primary: #212121;
    --text-secondary: #5f6368;
    --surface-bg: rgba(255, 255, 255, 0.45);
    --surface-border: rgba(224, 224, 224, 0.7);
    --surface-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    --primary-color: #00796b;
    --primary-dark: #004d40;
    --secondary-color: #5c6bc0;
    --secondary-dark: #3949ab;
    --status-bg: rgba(232, 245, 233, 0.8);
    --status-border: #a5d6a7;
    --mistake-color: #c62828;
    --modal-backdrop: rgba(0, 0, 0, 0.5);
    --glow-color: #00d4ff;
}

.dark-mode {
    --bg-gradient: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460, #385170);
    --text-primary: #e0e0e0;
    --text-secondary: #9e9e9e;
    --surface-bg: rgba(30, 40, 50, 0.5);
    --surface-border: rgba(255, 255, 255, 0.2);
    --surface-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --primary-color: #4db6ac;
    --primary-dark: #80cbc4;
    --secondary-color: #7986cb;
    --secondary-dark: #9fa8da;
    --status-bg: rgba(43, 58, 74, 0.8);
    --status-border: #4a5d6a;
    --mistake-color: #ef9a9a;
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --glow-color: #00ffff;
}

/* --- বিভিন্ন থিমস --- */
body.theme-sunset { --bg-gradient: linear-gradient(135deg, #ff7e5f, #feb47b, #ffb199, #f8b500); --primary-color: #ff7043; --primary-dark: #e65100; --secondary-color: #ffb74d; --text-primary: #3E2723; --text-secondary: #6D4C41; --surface-bg: rgba(255, 250, 240, 0.6); --status-bg: rgba(255, 224, 178, 0.8); }
body.theme-ocean { --bg-gradient: linear-gradient(135deg, #00c6ff, #0072ff); --primary-color: #29b6f6; --primary-dark: #0277bd; --secondary-color: #4dd0e1; --text-primary: #f0f0f0; --text-secondary: #e0e0e0; --surface-bg: rgba(100, 150, 255, 0.3); --status-bg: rgba(13, 71, 161, 0.5); }
body.theme-forest { --bg-gradient: linear-gradient(135deg, #22c1c3, #5f2c82, #49a09d, #2c3e50); --text-primary: #e0e0e0; --primary-color: #49a09d; --primary-dark: #22c1c3; }
body.theme-light-slate { --bg-gradient: linear-gradient(135deg, #f5f7fa, #c3cfe2); }
body.theme-fresh-mint { --bg-gradient: linear-gradient(135deg, #c3f9e9, #a8e6cf, #79dcb3, #43c18b); --text-primary: #003322; --text-secondary: #336655; --surface-bg: rgba(220, 255, 240, 0.45); --surface-border: rgba(168, 230, 207, 0.7); --primary-color: #008080; --primary-dark: #006666; --secondary-color: #3cb371; --secondary-dark: #2e8b57; --status-bg: rgba(230, 255, 240, 0.8); --status-border: #80c0a0; --mistake-color: #d9534f; }
body.theme-sandstone { --bg-gradient: linear-gradient(135deg, #F0E6D2, #D2B48C, #B58863, #8B693E); --text-primary: #3E2723; --text-secondary: #6D4C41; --surface-bg: rgba(255, 250, 240, 0.6); --surface-border: rgba(210, 180, 140, 0.7); --primary-color: #A0522D; --primary-dark: #8B4513; --secondary-color: #D2691E; --secondary-dark: #C04000; --status-bg: rgba(255, 245, 220, 0.8); --status-border: #D2B48C; --mistake-color: #E65100; }
body.theme-nightfall { --bg-gradient: linear-gradient(135deg, #0A192F, #172A45, #2F4858, #4B6F7D); --text-primary: #E5E9F0; --text-secondary: #A0A9B8; --surface-bg: rgba(23, 42, 69, 0.5); --surface-border: rgba(47, 72, 88, 0.7); --primary-color: #64FFDA; --primary-dark: #00BCD4; --secondary-color: #89CFF0; --secondary-dark: #00BFFF; --status-bg: rgba(20, 35, 50, 0.8); --status-border: #3A5F7D; --mistake-color: #E2798F; }
body.theme-classic-bw { --bg-gradient: linear-gradient(135deg, #ffffff, #f0f0f0, #e0e0e0, #cccccc); --text-primary: #000000; --text-secondary: #333333; --surface-bg: rgba(255, 255, 255, 0.8); --surface-border: rgba(0, 0, 0, 0.5); --surface-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); --primary-color: #000000; --primary-dark: #333333; --secondary-color: #666666; --secondary-dark: #555555; --status-bg: rgba(240, 240, 240, 0.8); --status-border: #999999; --mistake-color: #CC0000; }
body.theme-pure-black { --bg-gradient: linear-gradient(135deg, #000000, #1a1a1a); --text-primary: #ffffff; --text-secondary: #cccccc; --surface-bg: rgba(30, 30, 30, 0.6); --surface-border: rgba(255, 255, 255, 0.3); --surface-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.1); --primary-color: #e0e0e0; --primary-dark: #ffffff; --secondary-color: #bbbbbb; --secondary-dark: #dddddd; --status-bg: rgba(40, 40, 40, 0.8); --status-border: #555555; --mistake-color: #ff8a80; }
body.theme-pure-white { --bg-gradient: linear-gradient(135deg, #f8f9fa, #e9ecef); --text-primary: #212529; --text-secondary: #495057; --surface-bg: rgba(255, 255, 255, 0.7); --surface-border: #ced4da; --surface-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); --primary-color: #007bff; --primary-dark: #0056b3; --secondary-color: #6c757d; --secondary-dark: #5a6268; --status-bg: rgba(248, 249, 250, 0.9); --status-border: #dee2e6; --mistake-color: #dc3545; }

/* --- বডি এবং লেআউট --- */
body {
    margin: 0;
    padding: 20px;
    font-family: 'Kalpurush', 'Roboto', sans-serif;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: var(--text-primary);
    transition: background 0.5s ease, color 0.5s ease;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    user-select: none;
}
@keyframes gradientAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.container {
    max-width: 1100px;
    width: 100%;
    margin: 50px auto;
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    padding: 40px 50px;
    border-radius: 16px;
    transition: background 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    display: none;
    flex: 1;
    flex-direction: column;
}

h1 { text-align: center; font-size: 2.5rem; font-weight: 700; margin-bottom: 35px; color: var(--primary-dark); transition: color 0.5s ease; cursor: pointer; } 
p, li { color: var(--text-secondary); line-height: 1.7; }

/* --- বাটন স্টাইল --- */
button { padding: 12px 28px; margin: 8px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.lang-select button { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.lang-select button:hover { background-color: var(--primary-color); color: white; transform: translateY(-2px); }
.lang-select button.active { background-color: var(--primary-dark); border-color: var(--primary-dark); color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); transform: scale(1.05) translateY(-2px); }
#startSessionBtn, #custom2Controls button { border: none; color: white; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); }
#startSessionBtn:hover, #custom2Controls button:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); }
#startSessionBtn:not(.button) { background: var(--primary-color); }
#startSessionBtn:not(.button):hover { background: var(--primary-dark); }
#custom2Controls button { background: var(--secondary-color); }
#custom2Controls button:hover { background: var(--secondary-dark); }

/* --- ইনপুট এবং টেক্সট এরিয়া --- */
#testText, #inputArea, #custom1InputArea, #typedResultText, #customMinutes { 
    width: 100%; 
    background: rgba(0,0,0,0.02); 
    border: 1px solid var(--surface-border); 
    font-family: 'Kalpurush', 'Roboto', sans-serif !important;
    font-size: 18px !important;      
    line-height: 1.8 !important;     
    letter-spacing: 0.5px !important;
    padding: 20px !important;        
    border-radius: 12px; 
    color: var(--text-primary); 
    transition: all 0.3s ease; 
    box-sizing: border-box; 
    font-weight: 500; 
}

#testText { 
    min-height: 315px; 
    max-height: 315px; 
    margin-bottom: 25px; 
    overflow-y: auto; 
    user-select: none; 
    text-align: left; 
    white-space: pre-wrap; 
    overflow-x: hidden; 
    padding-right: 10px;
}
/* JS Fix: Paragraph Spacing */
#testText p { margin: 0 0 15px 0; padding: 0; line-height: inherit; font-size: inherit; text-indent: 0; }

#inputArea, #custom1InputArea, #typedResultText { 
    min-height: 150px; 
    resize: none; 
    white-space: pre-wrap; 
}

#customMinutes { padding: 12px 15px !important; font-size: 16px !important; width: auto; }
#inputArea:focus, #custom1InputArea:focus, #customMinutes:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.2); }
body.custom-2-active #inputArea { min-height: 385px; }

/* --- কন্ট্রোলস এবং লেআউট --- */
.lang-select, .custom-timer, .custom2-controls { text-align: center; margin-bottom: 40px; }
.lang-select { margin-bottom: 20px; }
.controls { text-align: center; margin-top: 20px; }
.controls button { background: rgba(0,0,0,0.05); border: 1px solid var(--surface-border); color: var(--text-secondary); font-size: 1rem; width: auto; height: auto; padding: 8px 18px; box-shadow: none; }
.controls button:hover { background: rgba(0,0,0,0.1); color: var(--text-primary); }

/* --- রেজাল্ট বক্স --- */
#resultBox { margin-top: 35px; padding: 30px; background: var(--status-bg); border: 1px solid var(--status-border); border-radius: 12px; display: none; font-size: 1.1rem; line-height: 1.8; }
.result-columns-container { display: flex; gap: 40px; }
.result-column { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-content: start; }
#resultBox .result-column b { color: var(--text-primary); }
#typedResultText .mistake { color: var(--mistake-color); text-decoration: underline; text-decoration-thickness: 2px; }
#typedResultText .mistake[title="Skipped Word"] { background-color: #ffebee; color: #c62828; font-style: italic; text-decoration-style: dotted; }
#typedResultText .mistake[title="Extra Word"] { background-color: #e8eaf6; color: #3949ab; }
#typedResultText .mistake[title="Extra Space"] { background-color: #ffcdd2; color: #c62828; font-weight: bold; padding: 0 5px; border-radius: 4px; text-decoration: none; font-size: 0.9em; }

/* --- সেটিংস বাটন --- */
#btnSettings { position: absolute; top: 20px; right: 20px; padding: 0; font-size: 1.5rem; width: 50px; height: 50px; border-radius: 50%; z-index: 10; background: transparent; color: var(--text-secondary); box-shadow: none; border: none; }
#btnSettings:hover { transform: rotate(90deg) scale(1.1); background: rgba(0,0,0,0.05); }

/* --- মোডাল স্টাইল --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: var(--modal-backdrop); align-items: center; justify-content: center; }
.modal-content, .modal-box { background-color: var(--surface-bg); backdrop-filter: blur(10px); margin: auto; padding: 30px; border: 1px solid var(--surface-border); border-radius: 16px; width: 90%; box-shadow: var(--surface-shadow); position: relative; }
.modal-content { max-width: 600px; }
.modal-box { max-width: 450px; text-align: center; max-height: 85vh; overflow-y: auto; }
.modal-box::-webkit-scrollbar { width: 8px; }
.modal-box::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 4px; }
.close-btn { color: var(--text-secondary); position: absolute; top: 10px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; }

/* --- লগিন মোডাল স্পেশাল --- */
.login-modal { animation: backdropFadeIn 0.6s forwards; opacity: 0; }
@keyframes backdropFadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-modal .modal-content { background: var(--surface-bg); backdrop-filter: blur(25px); border: 1px solid var(--surface-border); border-radius: 28px; max-width: 500px; padding: 50px 40px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); text-align: center; transform: scale(0.8); opacity: 0; animation: modalPopBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.3s; }
@keyframes modalPopBounce { 0% { transform: scale(0.8); opacity: 0; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.login-modal .modal-header { font-size: 2.8rem; font-weight: 800; color: rgba(255, 255, 255, 0.9); margin-bottom: 15px; letter-spacing: 0.05em; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.2); min-height: 40px; }
.dark-mode .login-modal .modal-header { color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.2); }
.login-modal .modal-text { font-size: 1.3rem; color: var(--text-primary); margin-bottom: 40px; line-height: 1.6; }
.login-modal .input-group { position: relative; display: flex; align-items: center; justify-content: center; width: 90%; margin: 0 auto; }
.login-modal #usernameInput { width: 100%; padding: 20px 20px 20px 60px; font-size: 1.3rem; font-family: 'Kalpurush', 'Roboto', sans-serif; border-radius: 15px; border: 2px solid var(--surface-border); transition: all 0.4s ease; box-sizing: border-box; color: var(--text-primary); background: rgba(0,0,0,0.08); }
.login-modal #usernameInput:focus { border-color: var(--primary-color); box-shadow: 0 0 15px var(--glow-color), 0 0 30px rgba(0, 191, 255, 0.2); outline: none; background: rgba(0,0,0,0.15); }
.login-modal .input-icon { position: absolute; left: 20px; color: var(--text-secondary); font-size: 1.6rem; transition: color 0.4s ease, text-shadow 0.4s ease; }
.login-modal #usernameInput:focus + .input-icon { color: var(--primary-color); text-shadow: 0 0 8px var(--glow-color); }
.login-modal .button { position: relative; z-index: 1; border: none; color: white; padding: 20px 60px; margin-top: 40px; font-size: 1.3rem; font-weight: 600; border-radius: 15px; cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); background: var(--primary-color); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); overflow: hidden; letter-spacing: 0.05em; text-transform: uppercase; }
.login-modal .button:before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(255, 255, 255, 0.3); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.5s ease-out, height 0.5s ease-out; z-index: -1; }
.login-modal .button:hover:before { width: 300%; height: 300%; }
.login-modal .button:hover { transform: translateY(-7px) scale(1.03); background: var(--primary-dark); box-shadow: 0 0 20px var(--glow-color), 0 15px 35px rgba(0, 0, 0, 0.4); }
.login-modal .button:active { transform: translateY(-2px) scale(0.98); box-shadow: 0 0 10px var(--glow-color), 0 5px 15px rgba(0, 0, 0, 0.3); transition: transform 0.1s ease, box-shadow 0.1s ease; }

#userInfo { display: none; text-align: center; margin-bottom: 25px; font-size: 18px; color: var(--primary-dark); font-weight: bold; }

/* --- ট্যাবস এবং সেটিংস --- */
.tabs { display: flex; border-bottom: 1px solid var(--surface-border); }
.tabs button { flex: 1; background: transparent; color: var(--text-secondary); border: none; box-shadow: none; border-bottom: 3px solid transparent; border-radius: 0; margin: 0; padding-bottom: 15px; }
.tabs button.active { color: var(--text-primary); border-bottom: 3px solid var(--primary-color); }
.tab-content { display: none; }
.tab-content.active { display: block; padding-top: 20px;}
.settings-panel { display: flex; align-items: center; justify-content: space-between; font-size: 18px; color: var(--text-primary); }
.theme-toggle { display: inline-block; width: 60px; height: 34px; position: relative; }
.theme-toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }

/* --- ইউজার ম্যানুয়াল স্ক্রলবার --- */
#manualTab { max-height: 400px; overflow-y: auto; padding-right: 10px; }
#manualTab::-webkit-scrollbar { width: 8px; }
#manualTab::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 4px; }

/* --- রিপোর্টস --- */
.reports-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#reportsHeader { margin: 0; color: var(--text-primary); }
#deleteAllReportsBtn { background-color: #c62828; font-size: 14px; padding: 8px 16px; }
#reportsList { list-style-type: none; padding: 0; margin-top: 20px; max-height: 350px; overflow-y: auto; padding-right: 10px; }
#reportsList li { background: var(--status-bg); border: 1px solid var(--status-border); border-radius: 12px; padding: 18px; margin-bottom: 15px; position: relative; transition: box-shadow 0.3s ease; line-height: 1.8; }
#reportsList li:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.delete-report-btn { position: absolute; top: 15px; right: 15px; background: transparent; border: none; cursor: pointer; font-size: 1.3rem; color: var(--mistake-color); padding: 5px; opacity: 0.6; transition: opacity 0.3s ease, transform 0.3s ease; }
.delete-report-btn:hover { opacity: 1; transform: scale(1.1); }

/* --- টাইমার ডিজাইন --- */
.test-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#currentTestTitle { margin: 0; }
.test-controls-right { display: flex; align-items: center; gap: 15px; }
.duration-select-test { display: none; background: rgba(0,0,0,0.05); border-radius: 8px; padding: 4px; }
.duration-select-test button { padding: 6px 12px; margin: 0 2px; font-size: 0.9rem; border: 2px solid transparent; color: var(--text-secondary); background: transparent; font-weight: 700; }
.duration-select-test button:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }
.duration-select-test button.active { background: var(--primary-color); border-color: var(--primary-color); color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transform: scale(1); }
.timer-display { font-size: 1.1rem; font-weight: 500; color: var(--text-secondary); background: var(--status-bg); padding: 8px 15px; border-radius: 8px; border: 1px solid var(--status-border); min-width: 100px; text-align: center; }

/* --- টাইপিং অ্যাক্টিভ স্টেট --- */
.typing-active .lang-select, .typing-active .custom-btn, .typing-active .custom2-controls, .typing-active #userInfo, .typing-active #btnSettings, .typing-active #passage-selector-container, .typing-active #btnSubscribe { opacity: 0.35; transition: opacity 0.5s ease; pointer-events: none; }
.typing-active .duration-select-test { opacity: 0.35; transition: opacity 0.5s ease; pointer-events: none; }
.typing-active *:hover { opacity: 1; pointer-events: auto; }

/* --- প্যাসেজ সিলেক্টর এবং লকিং স্টাইল --- */
#passage-selector-container { text-align: center; margin-bottom: 25px; }
.passage-selector-btn { width: 350px; padding: 15px 25px; font-size: 1.1rem; font-weight: 500; color: var(--text-secondary); background: var(--surface-bg); border: 1px solid var(--surface-border); border-radius: 12px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: inline-flex; justify-content: space-between; align-items: center; }
.passage-selector-btn:hover { border-color: var(--primary-color); color: var(--text-primary); box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.2); }

.passage-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-backdrop); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.passage-modal-overlay.visible { opacity: 1; visibility: visible; }
.passage-modal-content { background: var(--surface-bg); backdrop-filter: blur(20px); border-radius: 20px; width: 90%; max-width: 450px; box-shadow: var(--surface-shadow); border: 1px solid var(--surface-border); transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; max-height: 80vh; }
.passage-modal-overlay.visible .passage-modal-content { transform: scale(1); }
.passage-modal-header { padding: 20px 25px; border-bottom: 1px solid var(--surface-border); position: relative; }
.search-wrapper { position: relative; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.search-input { width: 100%; padding: 12px 15px 12px 45px; border-radius: 10px; border: 1px solid var(--surface-border); font-size: 1rem; background: rgba(255, 255, 255, 0.5); box-sizing: border-box; transition: all 0.2s ease; }
.search-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.2); }
.filter-tabs { display: flex; padding: 10px 25px; background: rgba(0,0,0,0.03); }
.tab-btn { flex: 1; padding: 10px 5px; border: none; background: transparent; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); border-bottom: 3px solid transparent; transition: all 0.3s ease; }
.tab-btn:hover { color: var(--primary-color); }
.tab-btn.active { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }
.passage-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex-grow: 1; }
.passage-item { padding: 15px 25px; cursor: pointer; border-bottom: 1px solid var(--surface-border); transition: background-color 0.2s ease; }
.passage-item:last-child { border-bottom: none; }
.passage-item:hover { background-color: rgba(0, 121, 107, 0.1); }
.passage-item.hidden { display: none; }

/* JS Fix: Locked Items Style */
.passage-item.locked { opacity: 0.7; background-color: rgba(0,0,0,0.02); cursor: pointer; position: relative; display: flex; justify-content: space-between; align-items: center; }
.passage-item.locked:hover { background-color: rgba(0,0,0,0.05); }
.lock-icon { color: #ff9800; margin-left: 10px; font-size: 0.9em; }

.passage-modal-footer { padding: 15px 25px; text-align: right; border-top: 1px solid var(--surface-border); }
.passage-close-btn { padding: 10px 20px; border: none; background: #e0e0e0; color: var(--text-secondary); border-radius: 8px; cursor: pointer; transition: background-color 0.2s ease; }
.passage-close-btn:hover { background: #d1d1d1; }

/* --- অ্যাডমিন প্যানেল CSS --- */
.admin-input, .admin-textarea, .admin-select { width: 100%; padding: 12px; font-size: 1rem; border-radius: 8px; border: 1px solid var(--surface-border); background: rgba(0,0,0,0.05); color: var(--text-primary); box-sizing: border-box; margin-bottom: 10px; }
.admin-textarea { height: 150px; resize: vertical; font-family: 'Kalpurush', 'Roboto', sans-serif; white-space: pre-wrap; }
.admin-button { background: var(--primary-color); color: white; border: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); }
.admin-button.danger { background: var(--mistake-color); }
.admin-button.danger:hover { background: #a91e1e; }
.admin-button.secondary { background: var(--secondary-color); }
.admin-button.secondary:hover { background: var(--secondary-dark); }
.admin-button:hover { background: var(--primary-dark); }
.admin-list { list-style: none; padding: 10px; max-height: 200px; overflow-y: auto; background: rgba(0,0,0,0.05); border: 1px solid var(--surface-border); border-radius: 8px; }
.admin-list li { padding: 10px; border-bottom: 1px solid var(--surface-border); display: flex; justify-content: space-between; align-items: center; }
.admin-list li:last-child { border-bottom: none; }
.admin-list .passage-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; margin-right: 15px; }
.admin-list .passage-actions { display: flex; gap: 8px; }
.admin-list .admin-action-btn { padding: 3px 8px; font-size: 0.8rem; margin: 0; }
.admin-list .delete-btn { background: transparent; border: 1px solid var(--mistake-color); color: var(--mistake-color); }
.admin-list .delete-btn:hover { background: var(--mistake-color); color: white; }
.admin-list .edit-btn { background: transparent; border: 1px solid var(--secondary-color); color: var(--secondary-color); }
.admin-list .edit-btn:hover { background: var(--secondary-color); color: white; }

.exam-snippet-box { background: rgba(0,0,0,0.05); border: 1px solid var(--surface-border); border-radius: 8px; padding: 10px 15px; margin-bottom: 10px; position: relative; }
.exam-snippet-box strong { font-size: 0.9rem; color: var(--text-primary); }
.exam-snippet-box p { font-size: 0.95rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 5px; margin-bottom: 5px; }
.exam-snippet-box .edit-exam-btn { position: absolute; top: 10px; right: 10px; padding: 5px 12px; font-size: 0.85rem; margin: 0; }
#adminExamTab .admin-list li { display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr; gap: 10px; padding: 12px 15px; font-size: 0.95rem; align-items: center; }
#adminExamTab .admin-list li.list-header { font-weight: 700; background: rgba(0,0,0,0.08); border-bottom: 2px solid var(--surface-border); color: var(--text-primary); padding: 15px; }
#adminExamTab .admin-list li span:not(:first-child) { text-align: center; font-weight: 500; }
#adminExamTab .admin-list li span:first-child { font-weight: 600; color: var(--primary-dark); }
#adminExamTab .admin-list li.no-results { grid-template-columns: 1fr; text-align: center; color: var(--text-secondary); }

/* --- ফুটার ও ডেভেলপার ইনফো --- */
.bottom-info-corner { margin-top: auto; padding-top: 40px; text-align: right; color: var(--text-primary); }
.developer-name { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; display: inline-block; cursor: pointer; transition: color 0.3s ease; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; }
.developer-name:hover { color: var(--primary-color); text-decoration-color: var(--primary-color); }

.contact-link { display: flex; align-items: center; gap: 15px; padding: 12px 15px; background: rgba(0,0,0,0.03); border-radius: 8px; text-decoration: none; color: var(--text-primary); font-weight: 500; transition: all 0.2s ease; border: 1px solid transparent; }
.contact-link:hover { background: rgba(0,0,0,0.06); transform: translateX(5px); border-color: var(--primary-color); }
.contact-link i { font-size: 1.2rem; width: 25px; text-align: center; }
.contact-link .fa-phone { color: #2e7d32; }
.contact-link .fa-envelope { color: #d93025; }
.contact-link .fa-whatsapp { color: #25D366; }
.contact-link .fa-facebook { color: #1877F2; }

/* --- প্রিমিয়াম বাটন --- */
#btnSubscribe { position: absolute; top: 20px; right: 80px; padding: 8px 15px; font-size: 1rem; border-radius: 20px; z-index: 10; background: linear-gradient(45deg, #FFD700, #FFA500); color: #fff; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-weight: bold; cursor: pointer; transition: transform 0.3s ease; }
#btnSubscribe:hover { transform: scale(1.1); box-shadow: 0 6px 15px rgba(0,0,0,0.3); }

/* --- প্রাইসিং কার্ড --- */
.pricing-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.pricing-card { background: #ffffff; border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; padding: 15px; width: 130px; text-align: center; cursor: pointer; position: relative; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.dark-mode .pricing-card { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); }
.pricing-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); border-color: var(--primary-color); }
.pricing-card.selected { border: 2px solid var(--primary-color); background: rgba(0, 121, 107, 0.05); box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.2); }
.dark-mode .pricing-card.selected { background: rgba(255, 255, 255, 0.15); }
.best-value { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #ff5722; color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.price-duration { font-size: 1rem; font-weight: bold; color: var(--text-secondary); margin-bottom: 5px; display: block; }
.dark-mode .price-duration { color: #ccc; }
.price-amount { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); display: block; }
.dark-mode .price-amount { color: var(--primary-color); }

/* --- পেমেন্ট ইনফো --- */
.payment-info { text-align: left; background: rgba(0,0,0,0.03); padding: 15px; border-radius: 10px; margin-bottom: 15px; display: none; animation: fadeIn 0.5s ease; }
.dark-mode .payment-info { background: rgba(255, 255, 255, 0.05); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.trx-input, .payment-select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Roboto', sans-serif; box-sizing: border-box; background: #fff; font-size: 1rem; height: 45px; }
.dark-mode .trx-input, .dark-mode .payment-select { background: #333; color: white; border-color: #555; }
.trx-input:focus, .payment-select:focus { outline: none; border-color: var(--primary-color); }

/* --- ইনপুট গ্রুপ স্টাইল (পাশাপাশি দেখার জন্য) --- */
.input-row { display: flex; gap: 10px; margin-top: 15px; }
.input-group-col { flex: 1; display: flex; flex-direction: column; }
.input-label { font-size: 0.8rem; margin-bottom: 5px; color: var(--text-secondary); font-weight: bold; }