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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #ffffff;
    background: linear-gradient(135deg, #0a1a0f 0%, #1a3d2e 30%, #2d5a3d 60%, #1a3d2e 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header - Mobile Optimized */
.header {
    background: rgba(10, 26, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 90, 61, 0.5);
    box-shadow: 0 2px 20px rgba(45, 90, 61, 0.2);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(45, 90, 61, 0.3));
}

.nav-brand h1 {
    color: #40e0d0;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

.btn-signin,
.btn-signup {
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-height: 44px; /* iOS touch target minimum */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-signin {
    background: none;
    border: 2px solid rgba(100, 255, 218, 0.5);
    color: #ffffff;
}

.btn-signin:hover {
    border-color: #64ffda;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

.btn-signup {
    background: linear-gradient(135deg, #64ffda 0%, #1de9b6 100%);
    color: #000000;
    border: none;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #4fd3b8 0%, #18c7a0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

/* Hero Section - Mobile Optimized */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 120px 1rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero-content h1 .highlight {
    color: #40e0d0;
    text-shadow: 0 0 20px rgba(64, 224, 208, 0.4);
}

.hero-description {
    border: 2px dashed rgba(64, 224, 208, 0.4);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: rgba(64, 224, 208, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-description p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #d0d0d0;
    margin: 0;
    line-height: 1.6;
}

/* Sports Selector - Mobile Optimized */
.sports-selector {
    margin-top: 1.5rem;
    width: 100%;
}

.sports-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sports-tabs-row2 {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.sport-btn {
    background: rgba(64, 224, 208, 0.15);
    border: 2px solid rgba(64, 224, 208, 0.4);
    color: #ffffff;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.sport-btn:active {
    transform: scale(0.98);
}

.sport-btn:hover {
    background: rgba(64, 224, 208, 0.25);
    border-color: #40e0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.3);
}

.sport-btn.active {
    background: linear-gradient(135deg, #40e0d0 0%, #20b2aa 100%);
    color: #0a1a0f;
    border-color: #40e0d0;
    box-shadow: 0 4px 20px rgba(64, 224, 208, 0.4);
}

/* Referee Search Section - Mobile Optimized */
.referee-search {
    padding: 2rem 0;
    background: rgba(30, 30, 30, 0.8);
}

.referee-search h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.search-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(10, 26, 15, 0.9);
    border: 2px solid rgba(64, 224, 208, 0.4);
    border-radius: 12px;
    padding: 0.8rem;
    gap: 0.8rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-bar:focus-within {
    border-color: #40e0d0;
    box-shadow: 0 0 25px rgba(64, 224, 208, 0.3);
}

.search-icon {
    color: #40e0d0;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    padding: 0.6rem;
    outline: none;
    min-width: 150px;
}

.search-input::placeholder {
    color: rgba(208, 208, 208, 0.6);
}

.filter-btn {
    background: linear-gradient(135deg, #40e0d0 0%, #20b2aa 100%);
    color: #0a1a0f;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    white-space: nowrap;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #20b2aa 0%, #008b8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.4);
}

/* Referee Cards - Mobile Optimized */
.referee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.referee-card {
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.9) 0%, rgba(26, 61, 46, 0.8) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.referee-card:active {
    transform: scale(0.98);
}

.referee-card:hover {
    transform: translateY(-8px);
    border-color: rgba(64, 224, 208, 0.6);
    box-shadow: 0 15px 45px rgba(64, 224, 208, 0.2);
}

.referee-info {
    text-align: center;
    flex-grow: 1;
}

.referee-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

.referee-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.book-now-btn {
    width: 100%;
    background: linear-gradient(135deg, #40e0d0 0%, #20b2aa 100%);
    color: #0a1a0f;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.3);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.book-now-btn:active {
    transform: scale(0.98);
}

.book-now-btn:hover {
    background: linear-gradient(135deg, #20b2aa 0%, #008b8b 100%);
    box-shadow: 0 8px 25px rgba(64, 224, 208, 0.5);
}

/* Features Section - Mobile Optimized */
.features {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.95) 0%, rgba(26, 61, 46, 0.9) 50%, rgba(45, 90, 61, 0.95) 100%);
    position: relative;
    border-top: 1px solid rgba(64, 224, 208, 0.2);
    border-bottom: 1px solid rgba(64, 224, 208, 0.2);
}

.hero-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: bold;
    color: #40e0d0;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(64, 224, 208, 0.4);
    padding: 0 1rem;
}

.subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #d0d0d0;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    padding: 0 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.9) 0%, rgba(26, 61, 46, 0.8) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(64, 224, 208, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-card:active {
    transform: scale(0.98);
}

.feature-icon {
    font-size: 2.5rem;
    color: #40e0d0;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(64, 224, 208, 0.5);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: white;
}

.feature-description {
    color: #d0d0d0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* How It Works - Mobile Optimized */
.how-it-works {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(26, 61, 46, 0.4) 0%, rgba(45, 90, 61, 0.3) 100%);
    border-top: 1px solid rgba(64, 224, 208, 0.2);
    border-bottom: 1px solid rgba(64, 224, 208, 0.2);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(10, 26, 15, 0.9) 0%, rgba(26, 61, 46, 0.8) 100%);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 15px;
    transition: all 0.3s;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.step:active {
    transform: scale(0.98);
}

.step-number {
    width: 60px;
    height: 60px;
    background: #40e0d0;
    color: #0a1a0f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.4);
}

.step h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.step p {
    color: #d0d0d0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CTA Section - Mobile Optimized */
.cta-section {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(30, 30, 30, 0.9));
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: #40e0d0;
    text-shadow: 0 0 20px rgba(64, 224, 208, 0.4);
}

.cta-section p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-cta {
    background: linear-gradient(135deg, #40e0d0 0%, #20b2aa 100%);
    color: #0a1a0f;
    box-shadow: 0 4px 20px rgba(64, 224, 208, 0.4);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-cta:active {
    transform: scale(0.98);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #4fd3b8 0%, #18c7a0 100%);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.3);
}

/* Footer - Mobile Optimized */
.footer {
    background: linear-gradient(135deg, rgba(5, 13, 8, 0.98) 0%, rgba(10, 26, 15, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(64, 224, 208, 0.3);
    padding: 2rem 0 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

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

.footer-section h3,
.footer-section h4 {
    color: #40e0d0;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.3);
    font-size: 1rem;
}

.footer-section {
    text-align: left;
}

.footer-section p {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: #cccccc;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.footer-section a:hover {
    color: #40e0d0;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(64, 224, 208, 0.2);
    color: #aaaaaa;
    font-size: 0.85rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }

    .nav-brand .logo {
        height: 45px;
    }

    .nav-brand h1 {
        font-size: 1.1rem;
    }

    .nav-menu {
        gap: 0.4rem;
        width: 100%;
        justify-content: flex-end;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .btn-signin,
    .btn-signup {
        font-size: 0.8rem;
        padding: 0.6rem 0.9rem;
    }

    .hero {
        min-height: 60vh;
        padding: 100px 1rem 2rem;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .sports-tabs {
        gap: 0.4rem;
    }

    .sport-btn {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }

    .referee-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .features-grid,
    .steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.6rem 0.8rem;
    }

    .nav-brand .logo {
        height: 40px;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .nav-link {
        display: none;
    }

    .btn-signin,
    .btn-signup {
        flex: 1;
        font-size: 0.85rem;
    }

    .hero {
        padding: 90px 1rem 1.5rem;
    }

    .hero-description {
        padding: 0.8rem;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
        min-width: 100%;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }

    .footer-section {
        padding: 0;
        margin-bottom: 1rem;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .footer-section a {
        font-size: 0.85rem;
    }

    .footer-section p {
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .sport-btn,
    .btn-signin,
    .btn-signup,
    .filter-btn,
    .book-now-btn,
    .btn-cta {
        min-height: 48px;
        padding: 0.9rem 1.2rem;
    }

    .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Safari iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }

    input,
    button {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Additional mobile styles */
.referee-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.referee-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #40e0d0;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.4);
}

.referee-location,
.referee-experience,
.referee-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    color: #d0d0d0;
    font-size: 0.9rem;
}

.referee-specialties,
.referee-availability {
    margin-bottom: 1rem;
}

.specialty-label,
.availability-label {
    display: block;
    color: #bbb;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-align: center;
    font-weight: 500;
}

.specialty-tags,
.availability-days {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.specialty-tag {
    background: rgba(64, 224, 208, 0.2);
    color: #40e0d0;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(64, 224, 208, 0.4);
}

.day-tag {
    background: rgba(60, 60, 60, 0.8);
    color: #d0d0d0;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(67, 143, 65, 0.2);
}

.rating-score {
    font-weight: 600;
    color: #ffc107;
    font-size: 1rem;
}

.rating-count {
    color: #aaa;
    font-size: 0.85rem;
}

/* Avatar initials for referees without photos */
.avatar-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #40e0d0 0%, #20b2aa 100%);
    color: #0a1a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #40e0d0;
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.4);
}

/* User Menu Dropdown Styling */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-display-btn {
    background: none;
    border: none;
    color: #d0d0d0;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.user-display-btn:hover {
    color: #40e0d0;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: #1a2820;
    border: 1px solid #40e0d0;
    border-radius: 8px;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    color: #d0d0d0;
    text-decoration: none;
    border-bottom: 1px solid #40e0d0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background-color: rgba(64, 224, 208, 0.1);
}

.user-dropdown button:last-child {
    border-bottom: none;
    color: #ff6b6b;
}

.user-dropdown button:last-child:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

/* Hero section highlight text - professional size */
.hero .highlight {
    color: #40e0d0;
    font-size: inherit;
    font-weight: 600;
}
