/* Apple-style typography and smooth transitions */
:root {
    --bg-color: #F5F5F7;
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #a52bee;
}

.text-accent {
    color: var(--accent-color);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
}

/* Smooth fade-in animation for cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.match-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* iOS style segmented control (Tabs) */
.segmented-control {
    background-color: #E3E3E8;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    position: relative;
}

.segment-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

.segment-btn.active {
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Flag Image Styling */
.flag-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Custom Dropdown Styling */
.dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background-color: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0,0,0,0.05);
    min-width: 140px;
    z-index: 50;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
    padding: 6px;
}

[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-item {
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--accent-color);
    color: white;
}

.dropdown-item .check-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-item.selected .check-icon {
    opacity: 1;
}

/* Hide scrollbar for a cleaner look if content overflows */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: #E3E3E8;
    background-image: linear-gradient(90deg, #E3E3E8 0px, #F5F5F7 40px, #E3E3E8 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(34%) sepia(87%) saturate(5833%) hue-rotate(264deg) brightness(96%) contrast(101%);
}

/* Hide Google Translate top banner / iframe */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}
body {
    top: 0 !important;
}
