/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base font size for rem calculations */
    -webkit-text-size-adjust: 100%; /* Prevent iOS font size changes */
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    overflow-x: hidden; /* Prevent horizontal scroll */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Use rem for consistent spacing */
    width: 100%;
}

/* Ensure container doesn't overflow on small screens */
@media (max-width: 320px) {
    .container {
        padding: 0 0.75rem;
    }
}

/* Header */
.header {
    background: #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background-color: transparent; /* Explicitly remove background color */
    border: none; /* Remove any border that might look like a background */
    display: block; /* Ensure proper display */
    max-width: 100%; /* Responsive image */
    height: auto; /* Maintain aspect ratio */
    min-height: 40px; /* Ensure minimum size */
    min-width: 40px; /* Ensure minimum size */
}

.logo i {
    font-size: 1.8rem;
}

/* Logo fallback when image fails to load */
.logo-fallback {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: #2563eb !important;
}

.logo-fallback::before {
    content: "🏆 ";
    margin-right: 0.25rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    justify-items: center;
    text-align: center;
}

.hero-text h1 {
    font-size: clamp(2rem, 8vw, 4rem); /* Responsive font size */
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.1;
    word-wrap: break-word;
    hyphens: auto;
}

.tagline {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.description {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #475569;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
    hyphens: auto;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* APK Download Button with Progress Animation */
.btn-download-apk {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    border: none;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
    touch-action: manipulation; /* Improve touch responsiveness */
    -webkit-tap-highlight-color: transparent; /* Remove iOS blue highlight */
    min-height: 48px; /* Minimum touch target size */
}

.btn-download-apk:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-download-apk i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-download-apk.downloading i {
    animation: bounce 1s infinite;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-download-apk.downloading .progress-bar {
    opacity: 1;
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.btn-download-apk.completed {
    background: #059669;
}

.btn-download-apk.completed i {
    animation: none;
}

/* Legacy button styles for compatibility */
.btn-download {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-download.primary {
    background: #2563eb;
    color: white;
}

.btn-download.primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-download.secondary {
    background: #1e293b;
    color: white;
}

.btn-download.secondary:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 41, 59, 0.3);
}

.btn-download i {
    font-size: 1.5rem;
}

.btn-download div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-download .small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.btn-download .large {
    font-size: 1rem;
    font-weight: 600;
}

/* Phone Mockup */
.hero-image {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1e293b;
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
}

.app-preview {
    padding: 20px;
    height: 100%;
}

.preview-header {
    text-align: center;
    margin-bottom: 20px;
}

.preview-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

.tournament-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #2563eb;
}

.tournament-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-type {
    background: #2563eb;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.prize {
    color: #059669;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    word-wrap: break-word;
    hyphens: auto;
}

.section-header p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0 1rem;
}

/* Introduction Section */
.introduction {
    padding: 80px 0;
    background: #ffffff;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    word-wrap: break-word;
    hyphens: auto;
}

.intro-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: #f8fafc;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    word-wrap: break-word;
    hyphens: auto;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

/* Achievements Section */
.achievements {
    padding: 80px 0;
    background: #ffffff;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: #059669;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-icon i {
    font-size: 1.5rem;
    color: white;
}

.achievement-content h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    hyphens: auto;
}

.achievement-content p {
    color: #64748b;
    line-height: 1.6;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: #f8fafc;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.stars i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.testimonial-content p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    word-wrap: break-word;
}

.author-info span {
    color: #64748b;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    word-wrap: break-word;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    word-wrap: break-word;
    hyphens: auto;
}

.cta-content p {
    font-size: clamp(1rem, 3vw, 1.1rem);
    margin-bottom: 2.5rem;
    opacity: 0.9;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0 1rem;
}

.cta .download-buttons {
    justify-content: center;
}

.cta .btn-download-apk {
    background: white;
    color: #2563eb;
}

.cta .btn-download-apk:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.cta .btn-download.primary {
    background: white;
    color: #2563eb;
}

.cta .btn-download.primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    word-wrap: break-word;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-section ul li a i {
    margin-right: 8px;
    width: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* Enhanced Responsive Design - Mobile First Approach */

/* Extra Small devices (phones, 320px and up) */
@media (max-width: 375px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-text {
        padding: 0 0.5rem;
    }
    
    .btn-download-apk {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        min-width: 180px;
    }
    
    .feature-card,
    .testimonial-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .achievement-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .intro-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 576px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .intro-stats {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat {
        flex: 1;
        min-width: calc(50% - 0.5rem);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-download-apk {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .nav {
        display: none;
    }
    
    .phone-mockup {
        width: 220px;
        height: 440px;
        margin: 0 auto;
    }
    
    .cta-content h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .cta-content p {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        padding: 0 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    .intro-stats {
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .intro-content {
        grid-template-columns: 2fr 1fr;
    }
    
    .intro-stats {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.achievement-card,
.testimonial-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover Effects */
.btn-download,
.feature-card,
.achievement-card,
.testimonial-card,
.stat {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States for Accessibility */
.btn-download:focus,
.nav a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    min-height: 44px !important;
    min-width: 44px !important;
    display: none !important;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #bdc3c7 !important;
}

/* Mobile Menu Dropdown */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .nav {
        display: none;
    }
    
    /* When mobile menu is active */
    .nav[style*="flex"] {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: #1e293b !important;
        flex-direction: column !important;
        padding: 1rem !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
        z-index: 1000 !important;
    }
    
    .nav[style*="flex"] a {
        color: #ffffff !important;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #334155 !important;
        text-decoration: none !important;
        display: block !important;
        transition: background-color 0.3s ease !important;
    }
    
    .nav[style*="flex"] a:hover {
        background-color: #2563eb !important;
    }
    
    .nav[style*="flex"] a:last-child {
        border-bottom: none !important;
    }
}

/* Additional Mobile Optimizations */
.nav a,
.btn-download-apk,
.social-links a,
.footer-section ul li a {
    min-height: 44px; /* iOS recommended touch target */
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent zoom on inputs for iOS */
input, textarea, select {
    font-size: 16px !important;
}

/* Improve text readability on mobile */
@media (max-width: 768px) {
    * {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Improve touch targets */
    .nav a {
        padding: 0.75rem 1rem;
    }
    
    /* Better spacing for mobile */
    .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Fix potential layout issues */
    .logo-img {
        width: 35px;
        height: 35px;
    }
}

/* Ultra-small devices (very old phones) */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .btn-download-apk {
        min-width: 160px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .feature-card,
    .testimonial-card,
    .achievement-card {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

