/* ========================================
   AhrefsTop - Combined Application Styles
   ======================================== */

/* =================
   CSS Reset for footer white space
   ================= */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* =================
   Tailwind Config
   ================= */
/* Tailwind configuration is handled via JavaScript in app.js */

/* =================
   Table Styles
   ================= */
/* Smooth table transitions */
#websites-table {
    transition: opacity 0.3s ease;
}

/* Smooth dropdown transitions */
.country-item,
.category-item {
    transition: background-color 0.15s ease;
}

/* =================
   404 Page Styles
   ================= */
.gradient-bg {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
}

.floating-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.glow {
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.3);
}

/* =================
   500 Page Styles
   ================= */
/* Error animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* =================
   Domain Page Styles
   ================= */
/* Hero Section Styles */
.hero-section {
    background-color: #ffffff;
    padding: 1.5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.02));
    transform: skewY(-3deg);
    transform-origin: bottom left;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb {
    color: #4a5568;
    /* gray-700 */
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: #4a5568;
    /* gray-700 */
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #2b6cb0;
    /* blue-600 */
    text-decoration: underline;
}

.domain-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1;
    color: #1a202c;
    /* gray-900 */
    word-break: break-word;
}

.domain-subtitle {
    font-size: 1.25rem;
    color: #4a5568;
    /* gray-700 */
    margin-top: 1rem;
    line-height: 1.5;
}

/* Chart Container Styles */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* =================
   Responsive Styles
   ================= */
@media (max-width: 768px) {
    .domain-title {
        font-size: 3rem;
    }

    /* Mobile table improvements */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure tables don't break layout on mobile */
    table {
        min-width: 100%;
        table-layout: fixed;
    }

    /* Make chart containers responsive */
    .chart-container {
        height: 300px !important;
        max-width: 100%;
        overflow: hidden;
    }

    /* Improve button spacing on mobile */
    .flex-wrap {
        gap: 0.5rem;
    }

    /* Better text sizing for mobile */
    .text-4xl {
        font-size: 2.25rem;
    }

    .text-5xl {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .domain-title {
        font-size: 2.5rem;
    }

    /* Smaller chart height for very small screens */
    .chart-container {
        height: 250px !important;
    }

    /* Adjust table cell padding for mobile */
    table th,
    table td {
        padding: 0.5rem 0.25rem;
    }

    /* Make sure text doesn't overflow in table cells */
    table td {
        word-break: break-word;
        max-width: 0;
    }
}

/* =================
   Utility Classes
   ================= */
/* Smooth scroll behavior is set via JavaScript */

/* Mobile-first responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-block {
        display: block !important;
    }

    .mobile-flex {
        display: flex !important;
    }
}

/* Ensure charts are responsive */
canvas {
    max-width: 100%;
    height: auto !important;
}