/* Mobile Optimization Styles */

/* Улучшенная адаптивность для мобильных устройств */

@media (max-width: 768px) {
    /* Общие улучшения */
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 16px;
    }

    /* Header */
    .header__logo {
        font-size: 1.2rem !important;
    }

    .header__nav {
        padding: 16px 0;
    }

    .header__link {
        padding: 12px 16px;
        font-size: 16px;
    }

    /* Exchange Section */
    .exchange__block {
        padding: 20px;
        margin-bottom: 16px;
    }

    .exchange__block-header {
        font-size: 1rem;
    }

    .exchange__block-input {
        font-size: 1.2rem;
        padding: 12px;
    }

    .exchange__block-list {
        gap: 8px;
    }

    .exchange__block-item {
        padding: 8px;
    }

    .exchange__block-item img {
        width: 24px;
        height: 24px;
    }

    /* Buttons */
    .btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 48px; /* Для удобного нажатия */
    }

    /* FAQ */
    .faq__title {
        font-size: 1.8rem;
    }

    .faq__question {
        font-size: 0.95rem;
        padding: 16px;
    }

    .faq__answer {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    /* Footer */
    .footer__container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Monitoring logos */
    .footer .container > div:last-child > div {
        gap: 16px !important;
    }

    .footer .container > div:last-child img {
        height: 48px !important;
    }

    /* Support section */
    .support__title {
        font-size: 1.5rem;
    }

    .support__btn {
        padding: 14px 32px;
        font-size: 16px;
    }

    /* Transactions */
    .transactions__title {
        font-size: 1.5rem;
    }

    /* Touch improvements */
    a, button, input, select {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Modal improvements */
    .modal-content {
        margin: 16px;
        max-width: calc(100% - 32px);
    }

    /* Admin panel mobile */
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Cards */
    .card {
        padding: 16px;
    }

    /* Stats cards */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .exchange__block-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .faq__title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    /* Reduce spacing */
    section {
        padding: 40px 0;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        bottom: 12px;
        right: 12px;
        font-size: 18px;
    }
}

/* Landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .exchange {
        padding: 40px 0;
    }

    .faq__item {
        margin-bottom: 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .faq__question,
    .exchange__block-item,
    .header__link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .exchange__block-item:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
    }
}
