/* FlipAll5 Landing Page - Mobile-First Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3498db;
    --primary-dark: #2c5f7c;
    --accent: #ff6b35;
    --text-dark: #2c5f7c;
    --text-body: #333;
    --text-muted: #666;
    --bg-light: rgba(168, 216, 234, 0.95);
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    padding: 12px;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
}

/* Header - Mobile First */
.main-header {
    text-align: center;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.main-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.header-text h1 {
    font-size: 2rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.main-tagline {
    font-size: 1rem;
    color: var(--text-dark);
    opacity: 0.8;
    font-style: italic;
}

/* Intro Section */
.intro-section {
    text-align: center;
    margin-bottom: 24px;
}

.intro-text {
    font-size: 0.95rem;
    color: var(--text-body);
    max-width: 600px;
    margin: 0 auto;
}

/* Games Grid - Mobile First (Single Column) */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.game-card {
    background: transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    min-height: 180px;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.coming-soon-card {
    pointer-events: none;
    cursor: default;
    opacity: 0.75;
}

.game-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.status-live {
    background: #27ae60;
    color: white;
    animation: pulse 2s infinite;
}

.status-soon {
    background: #f39c12;
    color: white;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0.85) 80%, rgba(255,255,255,0) 100%);
    backdrop-filter: blur(2px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.game-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-weight: 600;
}

.game-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.3;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.diff-all { background: #e3f2fd; color: #1565c0; }
.diff-expert { background: #fce4ec; color: #c2185b; }
.diff-standard { background: #fff3e0; color: #e65100; }
.diff-fun { background: #e8f5e9; color: #2e7d32; }

.game-cta {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Community Section */
.community-section {
    margin-bottom: 20px;
}

.community-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.community-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.community-card p {
    margin-bottom: 16px;
    opacity: 0.9;
    font-size: 0.9rem;
}

.btn-blog {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-blog:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.contact-section h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.contact-section p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.contact-email a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}

/* Social Media Icons - add this before the Footer section in style.css */

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    transform: scale(1.15);
    filter: brightness(1.15);
}

.social-link:active {
    transform: scale(1.05);
}

/* Brand colours */
.social-link[aria-label="Facebook"]    { background: #1877F2; }
.social-link[aria-label="Instagram"]   { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-link[aria-label="X / Twitter"] { background: #000000; }
.social-link[aria-label="Reddit"]      { background: #FF4500; }
.social-link[aria-label="TikTok"]      { background: #010101; }

/* Footer */
.copyright {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px solid rgba(44, 95, 124, 0.2);
    color: var(--text-dark);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.copyright-main {
    display: inline-flex;
    align-items: center;
    order: 1;
}

.app-version {
    font-size: 0.75rem;
    color: var(--text-dark);
    opacity: 0.6;
    order: 2;
}

.page-views {
    font-size: 0.75rem;
    color: var(--text-dark);
    opacity: 0.6;
    order: 3;
}

/* How to Play Button */
.how-to-play-btn {
    display: block;
    margin: 16px auto 0;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

.how-to-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.how-to-play-btn:active {
    transform: translateY(0);
}

/* Creator Info Icon */
.creator-info-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.creator-info-icon:hover {
    transform: scale(1.15);
}

.creator-info-icon:active {
    transform: scale(1.05);
}

.creator-info-icon svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.coming-soon-card {
    pointer-events: none;
    cursor: default;
    opacity: 0.75;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

/* Creator Modal */
.creator-modal-content {
    background: linear-gradient(135deg, #A8D8EA 0%, #9AC8DB 100%);
    padding: 20px;
}

.creator-heading {
    text-align: center;
    color: var(--text-dark);
    margin: 0 0 12px;
    font-size: 1.6rem;
}

.creator-duo {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.creator-person {
    text-align: center;
}

.creator-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.creator-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-caption {
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

.creator-person-name {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
    margin: 2px 0 0;
}

.creator-bio {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.5;
}

.creator-bio p {
    margin-bottom: 10px;
}

.creator-bio strong {
    color: var(--text-dark);
}

.creator-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.creator-contact .creator-email,
.creator-contact .creator-whatsapp {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 6px;
    margin: 0;
    font-size: 0.85rem;
}

.creator-contact .creator-email { border-left: 3px solid #2196f3; }
.creator-contact .creator-whatsapp { border-left: 3px solid #25D366; }

.creator-contact a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}

.creator-contact .creator-whatsapp a { color: #128C7E; }

.creator-thanks {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    margin-top: 12px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.creator-thanks p { margin-bottom: 0; }

/* ===== TABLET BREAKPOINT (min-width: 480px) ===== */
@media (min-width: 480px) {
    .game-card {
        min-height: 200px;
    }
}

/* ===== TABLET BREAKPOINT (min-width: 600px) ===== */
@media (min-width: 600px) {
    body {
        padding: 16px;
    }

    .container {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .header-content {
        flex-direction: row;
        gap: 16px;
    }

    .main-logo {
        width: 70px;
        height: 70px;
    }

    .header-text h1 {
        font-size: 2.5rem;
    }

    .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .game-card {
        min-height: 220px;
    }

    .game-info {
        padding: 14px;
    }

    .copyright {
        flex-direction: row;
        justify-content: center;
        position: relative;
        gap: 12px;
    }

    .app-version {
        position: absolute;
        left: 0;
        order: 0;
    }

    .copyright-main {
        order: 0;
    }

    .page-views {
        position: absolute;
        right: 0;
        order: 0;
    }

    .creator-photo {
        width: 120px;
        height: 120px;
    }

    .creator-heading {
        font-size: 1.8rem;
    }
}

/* ===== DESKTOP BREAKPOINT (min-width: 900px) ===== */
@media (min-width: 900px) {
    body {
        padding: 20px;
    }

    .container {
        padding: 30px;
    }

    .main-logo {
        width: 80px;
        height: 80px;
        border-radius: var(--radius-md);
    }

    .header-content {
        gap: 20px;
    }

    .header-text h1 {
        font-size: 3rem;
    }

    .main-tagline {
        font-size: 1.2rem;
    }

    .intro-text {
        font-size: 1.1rem;
        max-width: 800px;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .game-card {
        min-height: 240px;
    }

    .game-info {
        padding: 16px;
    }

    .game-title {
        font-size: 1.2rem;
    }

    .community-card {
        padding: 30px;
    }

    .community-card h3 {
        font-size: 1.5rem;
    }

    .creator-duo {
        gap: 48px;
    }

    .creator-photo {
        width: 150px;
        height: 150px;
    }

    .creator-heading {
        font-size: 2rem;
    }

    .creator-bio {
        font-size: 0.95rem;
    }

    .modal-content {
        max-width: 600px;
    }
}

/* ===== LARGE DESKTOP (min-width: 1200px) ===== */
@media (min-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .game-card {
        min-height: 200px;
    }

    .game-title {
        font-size: 1.1rem;
    }
    
    .game-description {
        font-size: 0.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .game-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .game-card:active {
        transform: scale(0.98);
    }
    
    .how-to-play-btn:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
}

/* Splash Modal */
.splash-modal {
    z-index: 1100;
}

.splash-modal-content {
    background: linear-gradient(135deg, var(--bg-light) 0%, #9AC8DB 100%);
    max-width: 400px;
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    animation: splashIn 0.4s ease-out;
}

@keyframes splashIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.splash-body {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.splash-body h1,
.splash-body h2,
.splash-body h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
}

.splash-body p {
    margin-bottom: 12px;
}

.splash-close-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #e55a2b 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
}

.splash-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.splash-close-btn:active {
    transform: translateY(0);
}

/* Help Modal */
.help-modal-content {
    background: white;
    max-width: 500px;
}

.help-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-light);
}

.help-body {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.6;
}

.help-body h1,
.help-body h2,
.help-body h3 {
    color: var(--text-dark);
    margin: 16px 0 8px;
}

.help-body h1 { font-size: 1.3rem; }
.help-body h2 { font-size: 1.15rem; }
.help-body h3 { font-size: 1rem; }

.help-body p {
    margin-bottom: 12px;
}

.help-body ul,
.help-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.help-body li {
    margin-bottom: 6px;
}

.help-body strong {
    color: var(--text-dark);
}

/* Tablet adjustments for new elements */
@media (min-width: 600px) {
    .how-to-play-btn {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    
    .main-header {
        position: relative;
    }
    
    .splash-modal-content {
        max-width: 480px;
        padding: 30px;
    }
    
    .help-modal-content {
        max-width: 550px;
    }
}

@media (min-width: 900px) {
    .splash-modal-content {
        max-width: 520px;
    }
    
    .help-modal-content {
        max-width: 600px;
    }
}

/* ============== Floating Install Button ============== */
.floating-install-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: linear-gradient(135deg, #2c5f7c, #1a4a63);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 95, 124, 0.4);
    z-index: 1000;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 124, 0.5);
}

.floating-install-btn:active {
    transform: translateY(0);
}

.floating-install-btn svg {
    flex-shrink: 0;
}

.floating-install-btn.pulse {
    animation: installPulse 1.5s ease-in-out 3;
}

@keyframes installPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(44, 95, 124, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(44, 95, 124, 0.8); }
}
