.profile-container {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .profile-container {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    
    .player-avatar {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .player-info h1 {
        font-size: 2em;
    }
    
    .player-stats {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card h3 {
        font-size: 14px;
    }
    
    .stat-card .stat-value {
        font-size: 18px;
    }
    
    .records-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .record-card {
        padding: 15px;
    }
    
    .record-card h3 {
        font-size: 16px;
    }
    
    .record-card .time {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 0 5px;
    }
    
    .profile-header {
        padding: 15px;
    }
    
    .player-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .player-info h1 {
        font-size: 1.5em;
    }
    
    .player-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 16px;
    }
    
    .record-card {
        padding: 12px;
    }
    
    .record-card h3 {
        font-size: 14px;
    }
    
    .record-card .time {
        font-size: 16px;
    }
}

.profile-header {
    background: var(--secondary);
    border-radius: var(--borderradius);
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 40px;
    backdrop-filter: blur(10px);
}

.player-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--fontcolor);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--hover);
}

.profile-link {
    color: var(--hover);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.profile-link:hover {
    opacity: 0.8;
}

.status-online {
    color: #4CAF50;
}

.player-info h1 {
    font-size: 3.2em;
    margin-bottom: 10px;
    color: var(--hover);
    background: var(--hover);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--secondary);
    border-radius: var(--borderradius);
    padding: 30px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.stat-card h3 {
    color: var(--hover);
    font-size: 2.5em;
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-card p {
    color: var(--fontcolor);
    opacity: 0.8;
}

.profile-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.section {
    background: var(--secondary);
    border-radius: var(--borderradius);
    padding: 30px;
}

.section h2 {
    color: var(--hover);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.records-list {
    max-height: 600px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-col);
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

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

.record-map {
    font-weight: 500;
}

.record-time {
    color: var(--hover);
    font-weight: 600;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.map-card {
    background: var(--background);
    border-radius: var(--borderradius);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.map-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.map-time {
    color: var(--hover);
    font-size: 0.9em;
}

.navigation-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--secondary) 0%, rgba(100, 100, 150, 0.1) 100%);
    color: var(--fontcolor);
    padding: 12px 20px;
    border-radius: var(--borderradius);
    text-decoration: none;
    border: 2px solid var(--border-col);
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--hover) 0%, rgba(100, 150, 255, 0.8) 100%);
    color: white;
    padding: 12px 20px;
    border-radius: var(--borderradius);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(100, 150, 255, 0.2);
}

@media (max-width: 768px) {
    .profile-container {
        padding: 15px;
    }
    
    .profile-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }
    
    .player-avatar {
        width: 120px;
        height: 120px;
        font-size: 48px;
    }
    
    .player-info h1 {
        font-size: 2.2em;
    }
    
    .player-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card h3 {
        font-size: 2em;
    }
    
    .section {
        padding: 20px;
    }
    
    .section h2 {
        font-size: 1.3em;
    }
    
    .records-list {
        max-height: 400px;
    }
    
    .maps-grid {
        max-height: 400px;
    }
}

@media (max-width: 360px) {
    .profile-container {
        padding: 8px;
    }
    
    .profile-header {
        padding: 15px 10px;
        gap: 12px;
    }
    
    .player-avatar {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .player-avatar img {
        width: 70px;
        height: 70px;
    }
    
    .player-info h1 {
        font-size: 1.4em;
    }
    
    .player-status {
        font-size: 0.9em;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-card h3 {
        font-size: 1.5em;
    }
    
    .stat-card p:first-of-type {
        font-size: 1.1em;
    }
    
    .stat-card p:last-child {
        font-size: 10px;
    }
    
    .section {
        padding: 10px;
    }
    
    .section h2 {
        font-size: 1.1em;
    }
    
    .records-list,
    .maps-grid {
        max-height: 300px;
        font-size: 11px;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .action-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

/* Landscape phone optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .profile-container {
        padding: 10px;
    }
    
    .profile-header {
        padding: 12px 8px;
        gap: 10px;
    }
    
    .player-avatar {
        width: 60px;
        height: 60px;
    }
    
    .player-info h1 {
        font-size: 1.3em;
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px;
    }
    
    .records-list,
    .maps-grid {
        max-height: 250px;
    }
}

