/* mobile-style.css */
@media (max-width: 768px) {
    /* Container adjustments */
    .section-container {
        padding: 1rem;
        margin: 0.5rem;
    }

    /* Text size adjustments */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }

    /* Button adjustments */
    .button {
        width: 100%;
        margin: 0.25rem 0;
        padding: 0.75rem;
    }

    /* Table adjustments */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Stack grid items */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Adjust spacing */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }

    /* Header adjustments */
    header .flex {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    /* Activity chart adjustments */
    .activity-cell {
        width: 2rem;
        height: 2rem;
    }
}

/* Fix loading and performance */
.animate-fade-in,
.animate-slide-up {
    will-change: transform, opacity;
}

/* Reduce animation complexity on mobile */
@media (max-width: 768px) {
    .animate-slide-up {
        animation: none;
        opacity: 1;
    }
}
@media (max-width: 640px) {
    /* General Body Styling */
    body {
        background: linear-gradient(135deg, #F28C38 0%, #F5A962 100%);
        color: #222;
        font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Header and Footer */
    header, footer {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border-radius: 0;
        padding: 0.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    header .flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    header .flex > div {
        width: 100%;
        text-align: center;
    }

    footer .text-center {
        font-size: 0.85rem;
    }

    /* Containers */
    .max-w-7xl, .max-w-6xl, .max-w-md {
        max-width: 100% !important;
        width: 100%;
        padding: 0 0.5rem;
        margin: 0 auto;
        box-sizing: border-box;
    }

    main {
        padding: 1rem 0.5rem !important;
        width: 100%;
        overflow-x: hidden;
    }

    /* Grid Layout */
    .grid {
        display: flex;
        flex-direction: column;
        gap: 1rem !important;
    }

    /* Section Styling */
    .bg-white {
        background: rgba(255, 255, 255, 0.98) !important;
        border-radius: 12px;
        padding: 1rem !important;
        margin-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .rounded-lg, .rounded, .rounded-full {
        border-radius: 12px !important;
    }

    .shadow-lg, .shadow, .hover-lift {
        box-shadow: 0 4px 12px rgba(242, 140, 56, 0.12) !important;
    }

    /* Typography */
    .text-2xl, .text-xl, .text-lg {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }

    h1.text-2xl {
        font-size: 1.25rem !important;
    }

    h3.text-xl {
        font-size: 1rem !important;
    }

    .text-sm {
        font-size: 0.85rem !important;
    }

    /* Spacing */
    .p-6, .p-8, .px-4, .py-8 {
        padding: 0.75rem !important;
    }

    .mb-8, .mt-8 {
        margin-bottom: 1rem !important;
        margin-top: 1rem !important;
    }

    .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }

    /* Buttons */
    button, a.bg-sunset-orange, a.bg-gray-500, button.bg-green-500, button.bg-gray-500 {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        width: auto;
        max-width: 100%;
        text-align: center;
    }

    /* Progress Bar */
    .progress-bar {
        background: linear-gradient(90deg, #F28C38 0%, #F5A962 100%) !important;
        box-shadow: 0 2px 8px rgba(242, 140, 56, 0.15);
        height: 0.75rem !important;
    }

    /* GitHub Activity Chart */
    .activity-cell {
        border-radius: 8px !important;
        border: 1px solid #F28C38 !important;
        background: #F5A96222 !important;
        width: 1.5rem !important;
        height: 1.5rem !important;
        font-size: 0.75rem !important;
    }

    .flex.justify-between.items-center.mb-4 {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .flex.justify-between.items-center.mb-4 > div {
        flex: 1 1 25%;
        text-align: center;
    }

    /* Tables */
    .table-auto {
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    .table-auto th, .table-auto td {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap;
    }

    /* Modals */
    .fixed.inset-0 {
        padding: 0.5rem;
        overflow-y: auto;
    }

    .fixed.inset-0 > div {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 8px;
    }

    .max-w-6xl {
        max-width: 100% !important;
    }

    /* CSV Preview */
    .overflow-x-auto {
        max-width: 100%;
        overflow-x: auto;
    }

    /* Tooltips */
    .tooltip:hover::after {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
        white-space: normal;
        max-width: 80vw;
        text-align: center;
    }

    /* Robot Animation */
    .robot-animation {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Colors */
    .text-sunset-orange {
        color: #F28C38 !important;
    }

    .bg-sunset-orange {
        background: #F28C38 !important;
        color: #fff !important;
    }

    .bg-sunset-dark {
        background: #E67E22 !important;
        color: #fff !important;
    }
}