/* gametrafficx/assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

/* Mobile First Optimizations */
@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem !important;
        line-height: 2.25rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Center all text and elements on mobile */
    .text-center-mobile {
        text-align: center !important;
    }
    
    .flex-center-mobile {
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Footer mobile centering */
    footer ul li {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    footer .grid > div {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    footer .grid > div:last-child {
        margin-bottom: 0;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Animation delays */
.animation-delay-100 {
    animation-delay: 100ms;
}
.animation-delay-300 {
    animation-delay: 300ms;
}
.animation-delay-500 {
    animation-delay: 500ms;
}
.animation-delay-1000 {
    animation-delay: 1000ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* FIXED: Select dropdown styling for dark background */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em 1em;
    padding-right: 2rem !important;
    cursor: pointer;
}

/* Style for select options in dark background */
select option {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    padding: 8px;
}

select:focus option {
    background-color: #374151 !important;
}

/* Form placeholder color for dark backgrounds */
input::placeholder, textarea::placeholder {
    color: rgba(219, 234, 254, 0.7) !important;
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-counter {
    animation: countUp 1s ease-out forwards;
}

/* Section spacing */
section {
    scroll-margin-top: 70px;
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#media-kit-modal > div {
    animation: modalFadeIn 0.3s ease-out;
}

/* Form validation styles */
input:invalid, textarea:invalid, select:invalid {
    border-color: #f87171 !important;
}

input:valid, textarea:valid, select:valid {
    border-color: #34d399 !important;
}

/* Custom checkbox and radio */
input[type="checkbox"], input[type="radio"] {
    accent-color: #3B82F6;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Better focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Form element focus */
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #3B82F6;
    ring-color: rgba(59, 130, 246, 0.1);
}

/* Button press effect */
.btn-press:active {
    transform: translateY(1px);
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    button, a.btn-like {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* Prevent text size adjustment on mobile */
html {
    -webkit-text-size-adjust: 100%;
}

/* Better mobile form experience */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-group a, .btn-group button {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Hero section mobile optimization */
@media (max-width: 640px) {
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons a {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

/* Feature grid mobile optimization */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Publisher categories mobile optimization */
@media (max-width: 768px) {
    .publisher-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .publisher-grid div {
        padding: 1rem !important;
    }
}

/* Footer mobile centering */
@media (max-width: 1024px) {
    footer .grid > div {
        text-align: center;
    }
    
    footer ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    footer .flex {
        justify-content: center;
    }
}

/* Ensure footer stays at bottom */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Loading animation for better UX */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}