/* Pixel_S2 - Mobile Responsive Styles */

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.mobile-nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet (768-1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {

    /* Show mobile menu */
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none !important;
    }

    /* Typography */
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    /* Hero */
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 32px;
    }

    .slide-content {
        padding: 30px 20px;
    }

    /* Grids - Single column */
    .stats-grid,
    .admin-stats-grid,
    .referral-stats-grid,
    .feature-grid,
    .tiers-grid {
        grid-template-columns: 1fr !important;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-form,
    .upload-form,
    .page-form,
    .settings-form {
        padding: 25px;
    }

    /* Upload */
    .upload-area {
        padding: 40px 20px;
    }

    .image-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Image Actions */
    .image-actions,
    .paste-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .image-actions .btn,
    .paste-actions .btn {
        width: 100%;
    }

    /* Dashboard */
    .badge-showcase {
        grid-template-columns: repeat(3, 1fr);
    }

    .recent-uploads {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tables */
    .admin-table,
    .referral-table,
    .leaderboard-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }

    /* Hide less important columns */
    .admin-table th:nth-child(n+5),
    .admin-table td:nth-child(n+5) {
        display: none;
    }

    /* Code */
    .code-container pre {
        font-size: 12px;
        padding: 15px;
    }

    /* Referrals */
    .code-display {
        flex-direction: column;
    }

    .code-display input {
        font-size: 18px;
    }

    .referral-link input {
        width: 100%;
        font-size: 13px;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Buttons - Touch friendly (44px minimum) */
    .btn {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 44px;
    }

    .btn-lg {
        padding: 15px 25px;
        font-size: 16px;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-header .btn {
        width: 100%;
    }

    /* Touch targets */
    a,
    button,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
    }

    /* Settings */
    .settings-section {
        padding: 20px;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Tabs */
    .tab-buttons {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 auto;
        min-width: 100px;
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .slide-content h1 {
        font-size: 28px;
    }

    .hero {
        padding: 30px 0;
    }

    .image-preview,
    .recent-uploads,
    .format-grid {
        grid-template-columns: 1fr;
    }

    .badge-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-icon {
        font-size: 36px;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 5px;
    }
}

/* Landscape tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}