/* ===== গল্প বিতরণ সিস্টেম — Frontend Styles (Clean/Professional) ===== */

.sds-wrapper {
    font-family: 'Noto Sans Bengali', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 40px 16px;
    box-sizing: border-box;
}

.sds-bg-glow {
    display: none;
}

.sds-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

/* ---------- Loader ---------- */
.sds-loader {
    text-align: center;
    color: #6b7280;
}
.sds-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #4b5563;
    animation: sdsSpin 0.9s linear infinite;
}
@keyframes sdsSpin { to { transform: rotate(360deg); } }
.sds-loader p { font-size: 15px; }

/* ---------- Card ---------- */
.sds-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    animation: sdsRise 0.4s ease;
    color: #1f2937;
}
@keyframes sdsRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sds-content {
    font-size: 16.5px;
    line-height: 1.9;
    color: #1f2937;
    white-space: pre-wrap;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 24px;
    word-break: break-word;
}
.sds-content::-webkit-scrollbar { width: 6px; }
.sds-content::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

.sds-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.sds-copy-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 13px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.sds-copy-btn:hover { background: #000000; }
.sds-copy-btn:active { transform: scale(0.98); }

.sds-copied-msg {
    font-size: 14px;
    color: #16a34a;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sds-copied-msg.sds-show { opacity: 1; }

/* ---------- Error / Sold-out state ---------- */
.sds-error-card {
    text-align: center;
    padding: 20px 6px;
}
.sds-error-icon { font-size: 40px; margin-bottom: 14px; }
.sds-error-text { font-size: 16px; color: #6b7280; line-height: 1.8; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .sds-wrapper { padding: 20px 12px; }
    .sds-card { padding: 24px 18px; border-radius: 14px; }
    .sds-content { font-size: 15.5px; line-height: 1.85; max-height: 55vh; margin-bottom: 20px; }
    .sds-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .sds-copy-btn { width: 100%; text-align: center; padding: 14px 18px; font-size: 15px; }
    .sds-copied-msg { text-align: center; }
}

@media (max-width: 380px) {
    .sds-card { padding: 20px 14px; }
    .sds-content { font-size: 15px; }
}

/* v1.4.0: limit/copy protection */
#sdsWrapper .sds-content { -webkit-user-select: text; user-select: text; }
#sdsWrapper .sds-limit-card { user-select: none !important; -webkit-user-select: none !important; }

/* v1.6.0: instruction + contact */
.sds-instruction {
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}
.sds-contact-link {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 15px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #334155;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: .15s ease;
}
.sds-contact-link:hover { background: #f1f5f9; color: #111827; }
.sds-contact-icon { font-size: 20px; line-height: 1; }
