/* Responsive Design for Coin Master Daily */

/* Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Typography adjustments */
    .text-4xl { font-size: 1.875rem; line-height: 2.25rem; }
    .text-3xl { font-size: 1.5rem; line-height: 2rem; }
    .text-2xl { font-size: 1.25rem; line-height: 1.75rem; }
    .text-xl { font-size: 1.125rem; line-height: 1.75rem; }
    
    /* Spacing adjustments */
    .p-8 { padding: 1.5rem; }
    .p-6 { padding: 1rem; }
    .px-8 { padding-left: 1rem; padding-right: 1rem; }
    .px-6 { padding-left: 1rem; padding-right: 1rem; }
    
    /* Grid adjustments */
    .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    /* Flex adjustments */
    .flex-row { flex-direction: column; }
    .justify-between { justify-content: center; }
    
    /* Button adjustments */
    button, .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Header adjustments */
    .header-content {
        text-align: center;
    }
    
    .header-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    /* Form adjustments */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Table adjustments */
    .table-responsive {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Navigation adjustments */
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        padding: 0.75rem;
        text-align: center;
        border-bottom: 1px solid #374151;
    }
    
    /* Stats cards adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Spin offer adjustments */
    .spin-offer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .spin-offer-info {
        width: 100%;
    }
    
    .spin-offer-button {
        width: 100%;
    }
    
    /* FAQ adjustments */
    .faq-question {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .faq-answer {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    /* Footer adjustments */
    .footer-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Admin panel adjustments */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-action {
        flex: 1;
        min-width: 120px;
    }
    
    /* Offer management adjustments */
    .offer-item {
        padding: 1rem;
    }
    
    .offer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .offer-actions {
        width: 100%;
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .offer-action {
        flex: 1;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    /* Grid adjustments */
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    
    /* Flex adjustments */
    .sm\:flex-row { flex-direction: row; }
    .sm\:justify-between { justify-content: space-between; }
    
    /* Text adjustments */
    .sm\:text-left { text-align: left; }
    .sm\:text-center { text-align: center; }
    
    /* Button adjustments */
    .btn-group {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .btn-group button {
        width: auto;
        margin-bottom: 0;
    }
    
    /* Stats grid adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    /* Newsletter form adjustments */
    .newsletter-form {
        flex-direction: row;
        gap: 1rem;
    }
    
    .newsletter-input {
        flex: 1;
    }
    
    .newsletter-button {
        width: auto;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    /* Grid system */
    .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    
    /* Flex system */
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:flex-col { flex-direction: column; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }
    
    /* Spacing */
    .md\:p-6 { padding: 1.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .md\:mb-0 { margin-bottom: 0; }
    .md\:mb-4 { margin-bottom: 1rem; }
    .md\:mb-6 { margin-bottom: 1.5rem; }
    .md\:mb-8 { margin-bottom: 2rem; }
    
    /* Typography */
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-left { text-align: left; }
    .md\:text-center { text-align: center; }
    
    /* Width and Height */
    .md\:w-12 { width: 3rem; }
    .md\:w-20 { width: 5rem; }
    .md\:w-32 { width: 8rem; }
    .md\:w-auto { width: auto; }
    .md\:h-12 { height: 3rem; }
    .md\:h-48 { height: 12rem; }
    
    /* Display */
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    
    /* Admin panel improvements */
    .admin-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .admin-actions {
        width: auto;
        flex-wrap: nowrap;
    }
    
    .admin-action {
        flex: none;
        min-width: auto;
    }
    
    /* Offer management improvements */
    .offer-content {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .offer-actions {
        width: auto;
        flex-direction: row;
    }
    
    .offer-action {
        flex: none;
    }
    
    /* Stats grid improvements */
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    /* Footer improvements */
    .footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        text-align: left;
    }
    
    /* Modal improvements */
    .modal-content {
        margin: 2rem auto;
        max-width: 500px;
        max-height: 80vh;
    }
    
    /* Form improvements */
    .form-row {
        flex-direction: row;
        gap: 1rem;
    }
    
    .form-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Navigation improvements */
    .nav-links {
        flex-direction: row;
        width: auto;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        text-align: left;
        border-bottom: none;
        border-right: 1px solid #374151;
    }
    
    .nav-link:last-child {
        border-right: none;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    /* Enhanced grid system */
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    
    /* Enhanced spacing */
    .lg\:p-10 { padding: 2.5rem; }
    .lg\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
    .lg\:gap-8 { gap: 2rem; }
    .lg\:gap-10 { gap: 2.5rem; }
    
    /* Enhanced typography */
    .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .lg\:text-5xl { font-size: 3rem; line-height: 1; }
    
    /* Enhanced widths */
    .lg\:w-1\/2 { width: 50%; }
    .lg\:w-1\/3 { width: 33.333333%; }
    .lg\:w-2\/3 { width: 66.666667%; }
    
    /* Admin panel enhancements */
    .admin-dashboard {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .admin-sidebar {
        background-color: #1f2937;
        padding: 1.5rem;
        border-radius: 0.5rem;
    }
    
    .admin-main {
        flex: 1;
    }
    
    /* Enhanced offer management */
    .offer-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 1.5rem;
    }
    
    /* Enhanced stats display */
    .stats-detailed {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .stat-card-large {
        padding: 2rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
    
    /* Enhanced modal */
    .modal-large {
        max-width: 800px;
        max-height: 90vh;
    }
    
    /* Enhanced forms */
    .form-advanced {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Maximum width containers */
    .xl\:max-w-7xl { max-width: 80rem; }
    .xl\:max-w-6xl { max-width: 72rem; }
    
    /* Enhanced spacing for large screens */
    .xl\:p-12 { padding: 3rem; }
    .xl\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    .xl\:gap-12 { gap: 3rem; }
    
    /* Enhanced grid for large screens */
    .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    
    /* Enhanced typography for large screens */
    .xl\:text-6xl { font-size: 3.75rem; line-height: 1; }
    .xl\:text-7xl { font-size: 4.5rem; line-height: 1; }
    
    /* Admin panel for large screens */
    .admin-dashboard-xl {
        display: grid;
        grid-template-columns: 300px 1fr 250px;
        gap: 2rem;
    }
    
    .admin-sidebar-xl {
        background-color: #1f2937;
        padding: 2rem;
        border-radius: 1rem;
        height: fit-content;
    }
    
    .admin-widgets {
        background-color: #f9fafb;
        padding: 1.5rem;
        border-radius: 1rem;
        height: fit-content;
    }
    
    /* Enhanced content layout */
    .content-layout-xl {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
    
    .sidebar-content {
        background-color: #f9fafb;
        padding: 2rem;
        border-radius: 1rem;
        height: fit-content;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Ultra wide specific adjustments */
    .xxl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .xxl\:gap-16 { gap: 4rem; }
    .xxl\:p-16 { padding: 4rem; }
    
    /* Enhanced admin layout for ultra wide */
    .admin-dashboard-xxl {
        display: grid;
        grid-template-columns: 350px 1fr 300px;
        gap: 3rem;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    * {
        border-color: #000 !important;
    }
    
    .bg-gray-800 {
        background-color: #000 !important;
        color: #fff !important;
    }
    
    .text-gray-400 {
        color: #fff !important;
    }
    
    button, .btn {
        border: 2px solid #000 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
    
    .spin-offer:hover {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --text-primary: #ffffff;
        --text-secondary: #d1d5db;
        --border-color: #374151;
    }
    
    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .card {
        background-color: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
    input, textarea, select {
        background-color: var(--bg-secondary);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .touch-target {
        padding: 0.75rem;
    }
    
    .hover\:bg-gray-750:hover {
        background-color: inherit;
    }
    
    .spin-offer:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-transparency: reduce) {
    .modal-backdrop {
        backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.8);
    }
}

/* Focus Visible Support */
@supports selector(:focus-visible) {
    button:focus:not(:focus-visible),
    input:focus:not(:focus-visible),
    textarea:focus:not(:focus-visible),
    select:focus:not(:focus-visible),
    a:focus:not(:focus-visible) {
        outline: none;
    }
    
    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible,
    a:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }
}

/* STEP 2: Add this to the VERY END of your responsive.css file */
/* Mobile Override with High Specificity */
@media (max-width: 575px) {
  .social-buttons-container .social-buttons {
    gap: 6px !important;
    padding: 0 5px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }
  
  .social-buttons-container .social-btn {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
    min-width: 70px !important;
    max-width: 95px !important;
    width: auto !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
  }
  
  .social-buttons-container .social-btn img {
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
  }
}

@media (max-width: 400px) {
  .social-buttons-container .social-btn {
    padding: 5px 6px !important;
    font-size: 0.7rem !important;
    min-width: 60px !important;
    max-width: 80px !important;
  }
  
  .social-buttons-container .social-btn img {
    width: 14px !important;
    height: 14px !important;
    margin-right: 3px !important;
  }
}

@media (min-width: 576px) {
  .social-buttons-container .social-buttons {
    gap: 12px !important;
  }
  
  .social-buttons-container .social-btn {
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
    min-width: 100px !important;
    max-width: 130px !important;
  }
  
  .social-buttons-container .social-btn img {
    width: 20px !important;
    height: 20px !important;
    margin-right: 6px !important;
  }
}

/* ALTERNATIVE APPROACH: If the above doesn't work, try modifying your existing mobile rules */
/* Find this section in responsive.css around line 34 and REPLACE it with: */

@media (max-width: 575.98px) {
    /* Apply full-width only to buttons that are NOT social buttons */
    button:not(.social-btn), 
    .btn:not(.social-btn) {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Keep other existing rules but exclude social buttons */
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group button:not(.social-btn) {
        width: auto;
        margin-bottom: 0;
    }
    
    /* Rest of your existing mobile rules... */
}