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

body {
    font-family: Arial, sans-serif;
    background-color: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    max-width: 390px;
    margin: 0 auto;
    height: 100vh;
    overflow: hidden;
}

.tournament-page-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        linear-gradient(rgba(40, 40, 40, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 40, 40, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    /* Account for bottom menu */
    padding-bottom: 60px;
}

.tournament-header {
    position: relative;
    background-color: rgba(0, 0, 0, 0.6);
    border-bottom: 2px solid #3498db;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 205px; /* Full header height */
    flex-shrink: 0; /* Prevent header from shrinking */
}

.tournament-header.minimized {
    height: 50px !important; /* Minimized header height */
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.tournament-page-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    /* Mobile touch scrolling optimizations */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    /* Prevent text selection during scrolling */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Remove padding-top since we're using flexbox now */
    padding-top: 0;
    /* Ensure content never scrolls above the header */
    scroll-padding-top: 0;
    /* Prevent overscroll above the header */
    overscroll-behavior-y: contain;
    /* Ensure content takes remaining space */
    min-height: 0;
}

.tournament-page-content::-webkit-scrollbar {
    width: 0px;
    display: none;
}

.tournament-page-content::-webkit-scrollbar-track {
    display: none;
}

.tournament-page-content::-webkit-scrollbar-thumb {
    display: none;
}

.tournament-page-content::-webkit-scrollbar-thumb:hover {
    display: none;
}

.tournament-image {
    width: 100%;
    height: 205px; /* Full header height */
    background: linear-gradient(135deg, rgba(231, 76, 60) 0%, rgba(52, 152, 219) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
}

.tournament-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

.tournament-header.minimized .tournament-image {
    height: 50px;
}

.tournament-image-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tournament-header.minimized .tournament-image-content {
    gap: 8px;
    flex-direction: row;
}

.tournament-logo {
    font-size: 36px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tournament-header.minimized .tournament-logo {
    font-size: 18px;
}

.tournament-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tournament-header.minimized .tournament-title {
    font-size: 12px;
    letter-spacing: 1px;
}

.tournament-title-bar {
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    padding: 6px 22px 6px 14px;
    z-index: 3;
}

.tournament-award-section {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 16px;
    margin-top: 10px;
    text-align: left;
    max-width: 300px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
    backdrop-filter: blur(3px);
}

.award-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #3498db;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.award-description {
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    word-wrap: break-word;
}

.tournament-header.minimized .tournament-award-section {
    display: none !important;
}

.tournament-title-icon {
    width: 1.7em;
    height: 1.7em;
    display: block;
    color: #fff;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px #000);
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.status-card {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(50, 50, 50, 0.5);
    border-radius: 2px;
    padding: 10px 8px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.status-card:hover {
    transform: translateY(-2px);
    border-color: rgba(231, 76, 60, 0.4);
}

.status-card.inprogress {
    border-color: rgba(231, 76, 60, 0.6);
}

.status-card.scheduled {
    border-color: rgba(52, 152, 219, 0.6);
}

.status-count {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 4px;
}

.status-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-card.inprogress .status-count {
    color: #e74c3c;
}

.status-card.scheduled .status-count {
    color: #3498db;
}

.tournament-nav {
    background-color: rgba(0, 0, 0);
    border-bottom: 1px solid rgba(50, 50, 50, 0.5);
    position: relative;
    z-index: 90;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
    transform: translateY(0);
}

.tournament-content {
    /* Ensure content takes full available height */
    height: 100%;
    overflow-y: auto;
    /* Enable proper scrolling behavior */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    /* Ensure content can scroll properly */
    min-height: 0;
    /* Ensure all child elements can trigger scrolling */
    pointer-events: auto;
}

/* Ensure all child elements within tournament content can trigger scrolling */
.tournament-content * {
    pointer-events: auto;
    touch-action: pan-y;
}

.loading, .empty {
    padding: 30px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 14px;
}

.tournament-share-button {
    position: fixed;
    top: calc(20px + var(--sat));
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.tournament-share-button img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
} 