:root {
    --tg-theme-bg-color: #fff;
    --tg-theme-text-color: #000;
    --tg-theme-hint-color: #999;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #40a7e3;
    --tg-theme-button-text-color: #fff;
    --tg-theme-secondary-bg-color: #f4f4f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 100px;
    /* Space for fixed actions */
}

header {
    background: none;
    padding: 0;
    border-bottom: none;
    margin-bottom: 15px;
}

#event-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/resources/assets/wa_eventcard_header.jpg');
    background-size: cover;
    background-position: center;
    padding: 40px 20px;
    text-align: left;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

#event-title {
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
}

#event-subtitle {
    margin-top: 5px;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.gps-link {
    color: var(--tg-theme-link-color);
    text-decoration: none;
    font-size: 14px;
}

.gps-link:hover {
    text-decoration: underline;
}

.action-buttons-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

h2 {
    font-size: 18px;
    margin-top: 0;
}

.card {
    background-color: var(--tg-theme-bg-color);
    margin: 0 10px 15px 10px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.description {
    margin-top: 15px;
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--tg-theme-text-color);
}

#teams-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team {
    background-color: var(--tg-theme-secondary-bg-color);
    padding: 10px;
    border-radius: 8px;
}

.team-title {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.player-item:last-child {
    border-bottom: none;
}

.player-name {
    display: flex;
    align-items: center;
}

.payment-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.paid {
    background-color: #4cd964;
    color: white;
}

.unpaid {
    background-color: #ff3b30;
    color: white;
}

.actions-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--tg-theme-bg-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

button {
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc !important;
    color: #666 !important;
}

.btn-primary {
    background-color: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
}

.btn-secondary {
    background-color: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-link-color);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.hidden {
    display: none;
}

.modal-content {
    background-color: var(--tg-theme-bg-color);
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 400px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 15px 0;
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.btn-mini {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--tg-theme-text-color);
    border-radius: 50%;
    margin-left: 10px;
    flex-shrink: 0;
    font-size: 14px;
}