/* Socialflarex Responsive CSS - Mobile & Tablet Optimizations */

/* === MOBILE FIRST RESPONSIVE DESIGN === */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .nav-menu {
        position: static;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        flex-direction: row;
        padding: 0;
        left: 0;
    }
    
    .nav-links {
        flex-direction: row;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .cookie-content {
        flex-direction: row;
        text-align: left;
    }
    
    .verification-buttons {
        flex-direction: row;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}



/* === GAME SPECIFIC RESPONSIVE STYLES === */

/* Game Grid Responsive */
.games-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Game Card Responsive */
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-flare), var(--shadow-main);
    border-color: rgba(107, 70, 193, 0.3);
}

.game-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-normal);
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    text-align: center;
}

.game-play-btn {
    width: 100%;
    margin-top: var(--spacing-sm);
}

@media (max-width: 480px) {
    .game-image {
        height: 120px;
    }
    
    .game-title {
        font-size: 1rem;
    }
    
    .game-card {
        padding: var(--spacing-sm);
    }
}

/* === HERO SECTION RESPONSIVE === */
.hero-section {
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    background: var(--bg-main);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* === FEATURES SECTION RESPONSIVE === */
.features-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-xl);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 769px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === FOOTER RESPONSIVE === */
.footer {
    background: rgba(15, 20, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--text-gold);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    width: 50px;
    height: 50px;
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.footer-disclaimer {
    background: rgba(0, 0, 0, 0.3);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.footer-disclaimer h5 {
    color: var(--text-gold);
    margin-bottom: var(--spacing-sm);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-meta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-meta span {
    background: rgba(107, 70, 193, 0.2);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        order: -1;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-meta {
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    .footer-brand {
        text-align: left;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
}

/* === GAME MODAL RESPONSIVE === */
.game-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
    height: 700px;
}

.game-modal-content .modal-body {
    padding: 0;
    height: calc(100% - 60px);
}

#gameContainer {
    width: 100%;
    height: calc(100% - 60px);
    border-radius: var(--radius-md);
    overflow: hidden;
}

#gameFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .game-modal-content {
        width: 95vw;
        height: 85vh;
        max-width: none;
    }
    
    .game-controls {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .game-controls .btn {
        width: 100%;
    }
}

/* === SEARCH AND FILTER RESPONSIVE === */
.search-filter-section {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-filter-controls {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Hide filter elements */
.filter-select {
    display: none !important;
}

.filter-select option {
    display: none !important;
}

@media (max-width: 768px) {
    .search-filter-controls {
        flex-direction: column;
    }
    
    .search-input,
    .filter-select {
        width: 100%;
        min-width: auto;
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sparkle-effect::before,
    .sparkle-effect::after {
        animation: none;
    }
    
    .flare-text {
        animation: none;
        background: var(--primary-electric-purple);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e5e5e5;
        --text-muted: #cccccc;
        --primary-electric-purple: #8b5cf6;
        --primary-gold: #fbbf24;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .modal,
    .cookie-consent-banner,
    .back-button-container,
    .game-modal,
    .loading-overlay {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content {
        margin-top: 0 !important;
    }
    
    .flare-text {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}
