/* public/css/app.css */

/* responsive-background.css - مدیریت هوشمند پس زمینه برای دستگاه‌های مختلف */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* پس زمینه اصلی - برای دسکتاپ و تبلت */
body {
    background-image: url('/images/background.jpg'); /* تصویر افقی برای دسکتاپ */
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
    transition: background-image 0.5s ease-in-out;
}

/* محتوای اصلی */
.content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* برای تبلت در حالت پرتره (عمودی) */
@media (max-width: 1024px) and (min-width: 769px) and (orientation: portrait) {
    body {
        background-image: url('../images/background2.jpg'); /* تصویر عمودی برای تبلت عمودی */
        background-size: cover;
        background-position: center center;
    }
}

/* برای موبایل در حالت پرتره (عمودی) */
@media (max-width: 768px) and (orientation: portrait) {
    body {
        background-image: url('../images/background2.jpg'); /* تصویر عمودی برای موبایل */
        background-size: cover;
        background-position: center center;
    }
    
    .content {
        padding: 15px;
        font-size: 16px;
    }
}

/* برای موبایل در حالت لنداسکیپ (افقی) */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        background-image: url('/images/background2.jpg'); /* تصویر افقی برای موبایل افقی */
        background-size: cover;
        background-position: center center;
    }
    
    .content {
        padding: 10px;
        font-size: 14px;
    }
}

/* برای دستگاه‌های با صفحه بسیار کوچک */
@media (max-width: 480px) {
    .content {
        padding: 10px;
        font-size: 14px;
    }
}

/* برای دستگاه‌های با رزولوشن بالا (رتینا) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-image: url('/images/background2.jpg');
    }
    
    @media (max-width: 768px) and (orientation: portrait) {
        body {
            background-image: url('/images/background2.jpg');
        }
    }
}

/* پشتیبانی از مرورگرهای مختلف */
body {
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.30); /* شفافیت 85% */
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* افکت محو برای زیبایی بیشتر */
}

.welcome-container, .question-container, .optional-container, .thank-you-container, .already-completed-container {
    text-align: center;
}

h1, h2 {
    color: #007bff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* سایه متن برای خوانایی بهتر */
}

.btn {
    background-color: rgba(0, 123, 255, 0.9); /* شفافیت 90% */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease; /* انیمیشن نرم برای هاور */
}

.btn:hover {
    background-color: rgba(0, 86, 179, 0.95); /* شفافیت 95% */
}

label {
    display: block;
    margin: 10px 0;
    font-weight: bold;
}

textarea {
    width: 100%;
    height: 100px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid rgba(204, 204, 204, 0.7); /* شفافیت حاشیه */
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8); /* پس زمینه شفاف */
}

.footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: rgba(136, 136, 136, 0.9); /* شفافیت متن */
    background-color: rgba(255, 255, 255, 0.7); /* پس زمینه شفاف */
    padding: 5px 10px;
    border-radius: 5px;
}

.footer a {
    color: rgba(0, 123, 255, 0.9); /* شفافیت لینک */
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
    color: rgba(0, 86, 179, 0.95); /* شفافیت لینک در هاور */
}

/* استایل اضافی برای بهبود خوانایی متن روی پس زمینه شفاف */
p, span, div, li {
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.7);
}