@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #111111;
    color: #ffffff;
    line-height: 1.6;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #111111;
}

.header {
    background-color: #F74400;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.timestamp-display {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
    cursor: help;
}

.main-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 100px;
    overflow-y: auto;
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mvp-section {
    margin-bottom: 2rem;
}

.mvp-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 500;
}

.mvp-cards-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-top: 4px;
}

.mvp-cards-container::-webkit-scrollbar {
    height: 4px;
}

.mvp-cards-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.mvp-cards-container::-webkit-scrollbar-thumb {
    background: #F74400;
    border-radius: 2px;
}

.mvp-card {
    min-width: 120px;
    background: #121316;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.mvp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.mvp-card.mvp-highlight {
    border: 2px solid #F74400;
    background: linear-gradient(135deg, rgba(247, 68, 0, 0.1) 0%, rgba(186, 52, 1, 0.05) 100%);
    box-shadow: 0 4px 15px rgba(247, 68, 0, 0.3);
}

.mvp-card.mvp-highlight::before {
    content: '👑';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.2rem;
    background: #F74400;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #121316;
}

.mvp-card {
    position: relative;
}

.mvp-player-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.mvp-player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mvp-player-points {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.mvp-player-stats {
    font-size: 0.75rem;
    color: #999999;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.mvp-player-owner {
    font-size: 0.7rem;
    color: #F74400;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

.tab-content h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 500;
}

.rankings-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rank-item {
    background: #121316;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    background: #1a1d21;
}

.rank-item.expandable {
    cursor: pointer;
}

.rank-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.rank-position {
    font-size: 1.1rem;
    font-weight: bold;
    color: #F74400;
    width: 3rem;
    text-align: center;
}

.manager-name {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
    color: #ffffff;
    margin-left: 1rem;
}

.points {
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.low {
    color: #BA3401;
}

.medium {
    color: #D98A3F;
}

.high {
    color: #83AC4B;
}

.very-high {
    color: #29B378;
}

.default {
    color: #ccc;
}

.expand-icon {
    color: #999999;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.lineup-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.lineup-header {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #F74400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-height: 32px;
}

.player-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.player-row:hover {
    background-color: rgba(247, 68, 0, 0.1);
}

.player-row:last-child {
    padding-bottom: 0.75rem;
}


.player-name {
    font-size: 0.9rem;
    color: #ffffff;
    margin: 0;
    flex: 1;
}

.player-points {
    font-size: 0.9rem;
    font-weight: 500;
}

.bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #121316;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    height: 70px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
}

.tab-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    color: #999999;
}

.tab-button.active {
    color: #F74400;
    background-color: rgba(247, 68, 0, 0.1);
}

.tab-button:hover {
    background-color: rgba(247, 68, 0, 0.1);
    color: #F74400;
}

.tab-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.tab-label {
    font-size: 0.75rem;
    font-weight: 500;
}

@media (max-width: 767px) {
    .app-container {
        max-width: 100%;
        margin: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #121316;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #F74400 0%, #ba3401 100%);
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-player-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.modal-body .player-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-total-points {
    font-size: 2rem;
    font-weight: bold;
}

.player-total-points.low {
    color: #BA3401;
}

.player-total-points.medium {
    color: #D98A3F;
}

.player-total-points.high {
    color: #83AC4B;
}

.player-total-points.very-high {
    color: #29B378;
}

.events-section h3 {
    color: #F74400;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.event-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #F74400;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
}

.event-type {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.85rem;
}

.event-minute {
    font-size: 0.75rem;
    color: #F74400;
    font-weight: 600;
    background: rgba(247, 68, 0, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    min-width: 2rem;
    text-align: center;
}

.event-points {
    font-weight: bold;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.3);
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .timestamp-display {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 2rem;
        padding-bottom: 110px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 70%;
        max-width: 600px;
    }
}