* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

.nav-links a:hover {
    color: #3b82f6;
}

/* Hamburger Menu - Button Element for iOS Safari */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    /* Button reset */
    background: none;
    border: none;
    outline: none;
    /* iOS Safari fixes */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Make it easily tappable */
    min-width: 44px;
    min-height: 44px;
    /* Positioning */
    position: relative;
    z-index: 9999;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Critical Safari fix - force touch events */
    touch-action: none;
    -webkit-touch-action: none;
}

/* Safari-specific touch fix */
@supports (-webkit-touch-callout: none) {
    .hamburger {
        /* Force Safari to recognize touches */
        -webkit-appearance: none;
        appearance: none;
        /* Add invisible background for touch detection */
        background: rgba(0,0,0,0.001);
    }
}

/* Ensure button looks like our design */
.hamburger:focus {
    outline: none;
}

.hamburger:active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    /* iOS Safari fix */
    pointer-events: none;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #3b82f6;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero {
    padding: 80px 0 120px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 24px;
    color: #94a3b8;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .tagline {
    font-size: 20px;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 40px;
    font-style: italic;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    margin: 0 10px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.cta-button.secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 20px rgba(100, 116, 139, 0.3);
}

.cta-button.secondary:hover {
    box-shadow: 0 8px 30px rgba(100, 116, 139, 0.4);
}

/* Section Styles */
.section-title {
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    color: #1a1a1a;
}

.white-section {
    background: #ffffff;
    padding: 100px 0;
    position: relative;
}

.dark-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 100px 0;
    color: white;
}

.dark-section .section-title {
    color: white;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.card {
    background: #f8fafc;
    padding: 40px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

.dark-section .card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-section .card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.dark-section .card h3 {
    color: white;
}

.card p {
    color: #64748b;
    font-size: 16px;
}

.dark-section .card p {
    color: #cbd5e1;
}

/* Step Cards */
.step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    margin: 0 auto 20px;
    color: white;
}

.step-card {
    text-align: center;
}

/* Feature Icons */
.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Team Photos */
.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.team-member {
    text-align: center;
}

.team-member .role {
    font-size: 18px;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 20px;
}

.team-member .experience {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 20px;
    font-style: italic;
}

.team-member .bio {
    font-size: 16px;
    color: #64748b;
    text-align: left;
    line-height: 1.7;
}

.team-member .bio p {
    margin-bottom: 15px;
}

.team-member .bio p:last-child {
    margin-bottom: 0;
}

/* Tournament Demo Section */
.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    /* Safari fixes */
    -webkit-box-align: center;
    -webkit-align-items: center;
    grid-auto-rows: minmax(auto, auto);
}

.demo-text {
    min-width: 0; /* Prevents text overflow in Safari */
}

.demo-text h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1a1a1a;
    /* Safari text rendering fix */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.demo-text p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.demo-visual {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 0; /* Safari fix */
}

.demo-visual p {
    color: #64748b;
    margin-top: 20px;
    font-size: 16px;
}

/* Tournament Visualization */
.tournament-visual {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 20px;
    position: relative;
}

.tournament-visual h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.seats-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin-top: 20px;
}

.seat {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.user-seat {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Team Section - About Page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 60px;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Vision Section */
.vision-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.vision-content p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 20px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .vision-content p {
        font-size: 16px;
        margin-bottom: 15px;
    }
}

/* Stats */
.stat-card {
    text-align: center;
}

.stat-card .number {
    font-size: 48px;
    font-weight: 900;
    color: #3b82f6;
    display: block;
    margin-bottom: 10px;
}

.stat-card .label {
    color: #cbd5e1;
    font-size: 16px;
}

.stat-highlight {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-top: 40px;
}

.stat-number {
    font-size: 48px;
    font-weight: 900;
    color: #dc2626;
    display: block;
}

/* Footer */
footer {
    background: #0f172a;
    padding: 40px 0;
    text-align: center;
    color: #64748b;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    /* iOS Safari fixes */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

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

.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }

    .section-title {
        font-size: 32px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
        /* Critical iOS Safari fixes */
        position: relative;
        z-index: 9999;
        background: transparent;
        border: none;
        outline: none;
        /* Make it larger for easier tapping */
        min-width: 44px;
        min-height: 44px;
        /* Center the spans */
        justify-content: center;
        align-items: center;
    }

    .cta-button {
        display: block;
        margin: 10px auto;
        text-align: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .card {
        padding: 30px 20px;
    }
    
    /* Demo section mobile fixes */
    .demo-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .demo-text h2 {
        font-size: 32px;
    }
    
    .demo-visual {
        padding: 40px 20px;
    }
}
