/**
 * فایل CSS اضافی برای بهبود responsive design
 * شامل استایل‌های پیشرفته برای دستگاه‌های مختلف
 */

/* CSS Variables برای responsive design */
:root {
    --mobile-padding: 15px;
    --tablet-padding: 20px;
    --desktop-padding: 30px;
    
    --mobile-font-size: 14px;
    --tablet-font-size: 16px;
    --desktop-font-size: 18px;
    
    --mobile-line-height: 1.4;
    --tablet-line-height: 1.5;
    --desktop-line-height: 1.6;
    
    --mobile-spacing: 1rem;
    --tablet-spacing: 1.5rem;
    --desktop-spacing: 2rem;
}

/* بهبودهای کلی برای موبایل */
@media (max-width: 768px) {
    /* بهبود خوانایی متن */
    body {
        font-size: var(--mobile-font-size);
        line-height: var(--mobile-line-height);
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* بهبود فاصله‌گذاری */
    .container, .container-fluid {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
    
    /* بهبود دکمه‌ها برای لمس */
    .btn, button, .glass-box-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px;
        touch-action: manipulation;
    }
    
    /* بهبود لینک‌ها */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }
    
    /* بهبود فرم‌ها */
    input, textarea, select {
        font-size: 16px; /* جلوگیری از zoom در iOS */
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid #e0e0e0;
        transition: border-color 0.3s ease;
    }
    
    input:focus, textarea:focus, select:focus {
        border-color: #007bff;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    }
    
    /* بهبود کارت‌ها */
    .card, .glass-box-content, .review-card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 1rem;
    }
    
    /* بهبود تصاویر */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* بهبود اسلایدرها */
    .glass-slider, .live-slider, .reviews-slider {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }
    
    /* بهبود منوها */
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 20px;
        font-size: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* بهبود فوتر */
    .footer-content {
        text-align: center;
    }
    
    .footer-content .row > div {
        margin-bottom: 2rem;
    }
}

/* بهبودهای خاص برای تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: var(--tablet-font-size);
        line-height: var(--tablet-line-height);
    }
    
    .container, .container-fluid {
        padding-left: var(--tablet-padding);
        padding-right: var(--tablet-padding);
    }
    
    /* بهبود grid layout */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* بهبود اسلایدرها */
    .glass-slider {
        padding: 2rem 1rem;
    }
    
    /* بهبود کارت‌ها */
    .card, .glass-box-content {
        padding: 1.5rem;
    }
}

/* بهبودهای خاص برای دسکتاپ */
@media (min-width: 1025px) {
    body {
        font-size: var(--desktop-font-size);
        line-height: var(--desktop-line-height);
    }
    
    .container, .container-fluid {
        padding-left: var(--desktop-padding);
        padding-right: var(--desktop-padding);
    }
    
    /* بهبود hover effects */
    .btn:hover, .glass-box-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* بهبود انیمیشن‌ها */
    .card, .glass-box-content {
        transition: all 0.3s ease;
    }
    
    .card:hover, .glass-box-content:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
}

/* بهبودهای خاص برای صفحات مختلف */
@media (max-width: 768px) {
    /* صفحه اصلی */
    .main-header {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .glass-slider-container {
        padding: 1rem;
    }
    
    .glass-box-content {
        padding: 1.5rem;
        text-align: center;
    }
    
    .glass-box-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .glass-box-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* بخش بازی‌ها */
    .games-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* بخش آمار */
    .new-section {
        padding: 3rem 0;
    }
    
    .box-part {
        padding: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .box-part h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .box-part p {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 1rem;
    }
    
    /* بخش برترین پلیرها */
    .top-players-section {
        padding: 3rem 0;
    }
    
    .podium-player {
        margin-bottom: 2rem;
    }
    
    /* بخش نظرات */
    .user-reviews-section {
        padding: 3rem 0;
    }
    
    .review-card {
        padding: 1.5rem;
        margin: 0 10px;
    }
    
    .user-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .review-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* بهبودهای خاص برای صفحات داخلی */
@media (max-width: 768px) {
    /* صفحه درباره ما */
    .about-header, .contact-header, .feedback-header, .terms-header {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .about-title, .contact-title, .feedback-title, .terms-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .about-content, .contact-content, .feedback-content, .terms-content {
        padding: 2rem 0;
    }
    
    /* فرم‌ها */
    .contact-form, .feedback-form {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* FAQ */
    .faq-item {
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* بهبودهای accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* بهبودهای dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color:slategray ;
        --text-color: #ffffff;

        --border-color: #404040;

    }
    
    body {
        background-color:#ff9900;
        color: var(--text-color);
    }
    
    .card, .glass-box-content, .review-card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
    
    input, textarea, select {
        background-color: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
}

/* بهبودهای print */
@media print {
    .navbar, .footer, .btn, button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        width: 100%;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card, .glass-box-content {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* بهبودهای landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .main-header {
        min-height: 100vh;
    }
    
    .glass-slider-container {
        padding: 0.5rem;
    }
    
    .glass-box-content {
        padding: 1rem;
    }
    
    .glass-box-title {
        font-size: 1.5rem;
    }
    
    .glass-box-description {
        font-size: 0.9rem;
    }
}

/* بهبودهای خاص برای iOS */
@supports (-webkit-touch-callout: none) {
    .mobile input, .mobile textarea, .mobile select {
        font-size: 16px;
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    .mobile .btn, .mobile button {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* بهبودهای خاص برای Android */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .mobile input, .mobile textarea, .mobile select {
        font-size: 16px;
    }
}

/* بهبودهای performance */
.mobile * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile input, .mobile textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* بهبودهای loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loaded {
    opacity: 1;
    pointer-events: auto;
}

/* بهبودهای error handling */
.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}
