/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */
:root {
    /* Цвета */
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --secondary-color: #4CAF50;
    --accent-color: #FF9800;
    --error-color: #f44336;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --border-color: #ddd;
    --border-light: #eee;
    --bg-light: #f8f9fa;
    --bg-blue: #e3f2fd;
    --bg-error: #ffebee;
    --white: #fff;
    
    /* Тени */
    --shadow-light: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-medium: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.1);
    
    /* Радиусы */
    --radius-small: 4px;
    --radius-medium: 6px;
    --radius-large: 8px;
    --radius-xl: 12px;
    
    /* Размеры */
    --container-max-width: 1000px;
    --input-height: 42px;
    --avatar-size: 80px;
    --avatar-small: 60px;
    --avatar-tiny: 40px;
    --avatar-mini: 32px;
    
    /* Переходы */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Шрифты */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-large: 32px;
    --font-size-medium: 28px;
    --font-size-base: 14px;
    --font-size-small: 12px;
}

/* ===================================
   БАЗОВЫЕ СТИЛИ
   =================================== */
.fortnite-stats-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
}

/* Утилитарные классы */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===================================
   ФОРМА ПОИСКА
   =================================== */
.fortnite-stats-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    padding: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin: 0;
    flex-grow: 0;
}

.form-group:nth-child(1) { flex: 2; min-width: 120px; }
.form-group:nth-child(2) { width: auto; min-width: 110px; }
.form-group:nth-child(3) { width: auto; min-width: 100px; }

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    font-size: var(--font-size-base);
    height: var(--input-height);
}

.fortnite-stats-submit {
    height: var(--input-height);
    margin: 0;
    white-space: nowrap;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: background var(--transition);
}

.fortnite-stats-submit:hover {
    background: var(--primary-dark);
}

/* ===================================
   РЕЗУЛЬТАТЫ И ОШИБКИ
   =================================== */
.fortnite-stats-results {
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    padding: 20px;
    display: none;
}

.fortnite-stats-error {
    background: var(--bg-error);
    border-left: 4px solid var(--error-color);
    padding: 15px;
    margin-top: 20px;
    border-radius: var(--radius-small);
    color: #c62828;
    display: none;
}

.form-notice {
    margin: 10px 0 20px;
    padding: 10px;
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    font-size: var(--font-size-base);
    color: var(--text-light);
    border-radius: var(--radius-small);
}

/* ===================================
   ENHANCED PLAYER HEADER
   =================================== */
.player-header-new {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.player-main-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.player-avatar-new {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    margin-right: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.player-avatar-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details-new {
    flex: 1;
}

.player-name-new {
    font-size: var(--font-size-large);
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.season-info {
    font-size: var(--font-size-base);
    opacity: 0.8;
    font-weight: 500;
}

.battle-pass-right {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-large);
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 200px;
    text-align: center;
}

.battle-pass-right .bp-level,
.bp-level {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 3px;
}

.battle-pass-right .bp-progress,
.bp-progress {
    font-size: var(--font-size-base);
    opacity: 0.9;
}

/* ===================================
   СТАТИСТИЧЕСКИЕ КАРТОЧКИ В HEADER
   =================================== */
.stats-grid-header {
    display: grid;
    gap: 20px;
    position: relative;
    z-index: 2;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card-header {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform var(--transition), background var(--transition);
}

.stat-card-header:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.2);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.stat-value-header {
    font-size: var(--font-size-medium);
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label-header {
    font-size: var(--font-size-base);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Цветовые схемы для карточек */
.pr-card { background: linear-gradient(135deg, #FF6B35, #F7931E) !important; }
.wins-card { background: linear-gradient(135deg, var(--secondary-color), #45A049) !important; }
.kd-card { background: linear-gradient(135deg, #9C27B0, #7B1FA2) !important; }
.winrate-card { background: linear-gradient(135deg, var(--accent-color), #F57C00) !important; }
.matches-card { background: linear-gradient(135deg, #607D8B, #455A64) !important; }
.time-card { background: linear-gradient(135deg, #E91E63, #C2185B) !important; }

/* ===================================
   PR КАРТОЧКА С ПРОГРЕСС-КРУГОМ
   =================================== */
.pr-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.pr-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pr-progress-circle {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: 80px;
}

.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.2);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--white);
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.percentage {
    fill: var(--white);
    font-family: sans-serif;
    font-size: 0.4em;
    text-anchor: middle;
    font-weight: bold;
}

@keyframes progress {
    0% { stroke-dasharray: 0 100; }
}

/* ===================================
   СИСТЕМА ВКЛАДОК
   =================================== */
.stats-tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 3px solid var(--bg-blue);
    flex-wrap: wrap;
    background: var(--white);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.tab-button {
    padding: 12px 20px;
    background: var(--bg-light);
    border: none;
    border-bottom: 3px solid transparent;
    margin-right: 5px;
    margin-bottom: -3px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all var(--transition-slow);
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    font-size: 15px;
}

.tab-button:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.tab-button.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-blue);
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-slow);
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================================
   СТАТИСТИЧЕСКИЕ КАРТОЧКИ (ОСНОВНЫЕ)
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stats-card {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    transition: transform var(--transition), box-shadow var(--transition);
    margin-bottom: 15px;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stats-card h3 {
    margin: 0 0 15px 0;
    background: #f3f9ff;
    padding: 12px 15px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-color);
    font-size: 18px;
    border-radius: var(--radius-small);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-row::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}

.stat-row:last-child::after {
    display: none;
}

.stat-label {
    font-weight: 500;
    color: var(--text-light);
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
}

/* ===================================
   LOADING И УТИЛИТЫ
   =================================== */
.loading {
    text-align: center;
    padding: 30px;
}

.loading:after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cache-info {
    text-align: right;
    font-size: var(--font-size-small);
    color: var(--text-muted);
    margin-top: 20px;
    font-style: italic;
}

/* ===================================
   RECENT PLAYERS
   =================================== */
.fortnite-stats-recent-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    margin: 0 auto;
}

.fortnite-stats-recent-card {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: var(--radius-large);
    box-sizing: border-box;
    max-width: 400px;
}

.fortnite-stats-recent-avatar {
    display: inline-flex;
    margin-right: 10px;
}

.fortnite-stats-recent-avatar img {
    width: var(--avatar-tiny);
    height: var(--avatar-tiny);
    border-radius: 50%;
}

.fortnite-stats-recent-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fortnite-stats-recent-name {
    font-weight: bold;
    margin: 0;
}

.fortnite-stats-recent-account-type {
    color: var(--text-light);
    margin: 0;
}

.fortnite-stats-recent-check {
    font-size: var(--font-size-small);
    background-color: #1e90ff;
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 10px;
}

.fortnite-stats-recent-check:hover {
    background-color: #1c86ee;
}

/* ===================================
   ВИЗУАЛИЗАЦИИ И ДИАГРАММЫ
   =================================== */
.stats-visualization {
    display: flex;
    flex-direction: column;
    align-items: flex-left;
    padding: 15px;
}

.pie-chart {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #f1f1f1;
    margin: 20px auto;
    overflow: hidden;
}

.pie-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    left: 0;
    top: 0;
}

.pie-segment.solo {
    background: var(--primary-color);
    transform: rotate(0deg) skew(0deg);
    clip-path: polygon(50% 50%, 50% 0%, calc(50% + 50% * sin(calc(var(--percentage) * 3.6deg))) calc(50% - 50% * cos(calc(var(--percentage) * 3.6deg))));
    z-index: 3;
}

.pie-segment.duo {
    background: var(--secondary-color);
    transform: rotate(calc(var(--solo-percentage) * 3.6deg));
    clip-path: polygon(50% 50%, 50% 0%, calc(50% + 50% * sin(calc(var(--percentage) * 3.6deg))) calc(50% - 50% * cos(calc(var(--percentage) * 3.6deg))));
    z-index: 2;
}

.pie-segment.squad {
    background: var(--accent-color);
    transform: rotate(calc((var(--solo-percentage) + var(--duo-percentage)) * 3.6deg));
    clip-path: polygon(50% 50%, 50% 0%, calc(50% + 50% * sin(calc(var(--percentage) * 3.6deg))) calc(50% - 50% * cos(calc(var(--percentage) * 3.6deg))));
    z-index: 1;
}

.pie-chart-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 20px auto;
}

.pie-chart-simple {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0% var(--solo-end),
        var(--secondary-color) var(--solo-end) var(--duo-end),
        var(--accent-color) var(--duo-end) var(--squad-end),
        #00ffae var(--squad-end) 100%
    );
}

.pie-legend {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: var(--font-size-base);
}

.color-box {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
}

.pie-percentages {
    margin-top: 10px;
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.percentage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.percentage-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
}

.percentage-label {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

/* ===================================
   PERFORMANCE ВИЗУАЛИЗАЦИЯ (K/D)
   =================================== */
.performance-bar-container {
    margin-top: 15px;
    width: 100%;
}

.mode-performance {
    margin-bottom: 15px;
}

.mode-label {
    font-weight: 500;
    margin-bottom: 5px;
}

.performance-bar {
    display: flex;
    height: 30px;
    width: 100%;
    border-radius: var(--radius-small);
    overflow: hidden;
}

.bar-kill {
    background: var(--secondary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-size: 13px;
    font-weight: bold;
    min-width: 30px;
}

.bar-death {
    background: #F44336;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-size: 13px;
    font-weight: bold;
    min-width: 30px;
}

.performance-ratio {
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 5px;
}

.bar-legend {
    display: flex;
    margin-top: 10px;
    gap: 15px;
}

/* ===================================
   СЧЕТЧИК ИГРОВОГО ВРЕМЕНИ
   =================================== */
.time-counter {
    margin: 20px auto;
    text-align: center;
}

.time-display {
    background: #f3f9ff;
    border-radius: var(--radius-large);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.time-unit {
    margin: 0 10px;
    min-width: 80px;
}

.time-value {
    font-size: var(--font-size-medium);
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

.time-label {
    font-size: var(--font-size-base);
    color: var(--text-light);
}

.time-distribution {
    height: 25px;
    background: var(--border-light);
    border-radius: var(--radius-small);
    overflow: hidden;
    margin: 15px 0;
    display: flex;
}

.time-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.time-segment.solo {
    background: var(--primary-color);
}

.time-segment.duo {
    background: var(--secondary-color);
}

.time-segment.squad {
    background: var(--accent-color);
}

.time-segment.ltm {
    background: #00ffae;
}

/* ===================================
   ИНДИКАТОРЫ ЭФФЕКТИВНОСТИ ПО ВРЕМЕНИ
   =================================== */
.efficiency-meters {
    margin-top: 20px;
}

.efficiency-meter {
    margin-bottom: 15px;
}

.efficiency-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

.efficiency-value {
    color: var(--primary-color);
    font-weight: bold;
}

.efficiency-bar {
    height: 12px;
    background: var(--border-light);
    border-radius: var(--radius-medium);
    overflow: hidden;
    position: relative;
}

.efficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, #81D4FA, var(--primary-color));
    border-radius: var(--radius-medium);
    transition: width 0.5s ease;
}

.efficiency-mode-title {
    margin: 15px 0 10px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 5px;
}

/* ===================================
   PR СИСТЕМА И РЕЙТИНГИ
   =================================== */
.player-pr-block {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 10px;
    gap: 15px;
}

.pr-text {
    text-align: center;
    margin-right: 10px;
}

.pr-label {
    font-size: 24px;
    font-weight: 700;
}

.pr-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.1;
}

.pr-rank {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-color);
}

.pr-chart {
    width: var(--avatar-size);
    height: var(--avatar-size);
    position: relative;
}

.player-pr-block .pr-chart svg {
    width: var(--avatar-size);
    height: var(--avatar-size);
}

.pr-chart-text {
    fill: var(--text-color);
    font-size: 20px;
    font-weight: bold;
}

.battle-pass-compact {
    background: var(--bg-blue);
    padding: 10px;
    border-radius: var(--radius-medium);
    margin-bottom: 10px;
}

.battle-pass-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.battle-pass-stats {
    display: flex;
    flex-direction: column;
}

.bp-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.bp-label {
    color: var(--text-light);
    font-size: var(--font-size-base);
    margin-right: 15px;
}

.bp-value {
    color: var(--primary-color);
    font-weight: bold;
}

/* ===================================
   PR ВКЛАДКА И ДЕТАЛИ
   =================================== */
.pr-overview {
    text-align: center;
}

.pr-score-container {
    margin: 20px 0;
}

.pr-score {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.pr-progress-bar {
    height: 10px;
    background: #f1f1f1;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.pr-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #64B5F6);
    border-radius: 5px;
}

.pr-explanation {
    color: var(--text-light);
    font-size: var(--font-size-base);
    line-height: 1.5;
    margin-top: 15px;
}

.pr-ranks-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.pr-ranks-table th, 
.pr-ranks-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.pr-ranks-table th {
    font-weight: 600;
    color: #555;
}

.pr-ranks-table .current-rank {
    background: var(--bg-blue);
    font-weight: bold;
    position: relative;
}

.pr-ranks-table .current-rank td {
    color: var(--primary-color);
}

#pr-tab .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.pr-ranks-card {
    display: flex;
    flex-direction: column;
}

.pr-ranks-table {
    margin-top: auto;
}

.pr-overview .pr-explanation {
    padding: 10px;
    background: rgba(33, 150, 243, 0.05);
    border-radius: var(--radius-medium);
    margin-top: 20px;
}

.pr-calculation-details {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-medium);
    margin-top: 20px;
}

.pr-calculation-details h4 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.pr-calculation-text {
    color: var(--text-light);
    font-size: var(--font-size-base);
    line-height: 1.5;
}

/* ===================================
   ЦВЕТОВЫЕ ИНДИКАТОРЫ ДЛЯ PR УРОВНЕЙ
   =================================== */
.pr-value[data-level="novice"] {
    color: #78909C; /* Серо-синий для новичков */
}

.pr-value[data-level="amateur"] {
    color: var(--secondary-color); /* Зеленый для любителей */
}

.pr-value[data-level="experienced"] {
    color: #FFC107; /* Желтый для опытных */
}

.pr-value[data-level="professional"] {
    color: var(--primary-color); /* Голубой для профессионалов */
}

.pr-value[data-level="elite"] {
    color: #FF5722; /* Оранжевый для элиты */
}

/* ===================================
   АНИМАЦИИ
   =================================== */
@keyframes fillProgress {
    from { stroke-dashoffset: 94.2; }
    to { stroke-dashoffset: var(--dash-offset, 0); }
}

/* ===================================
   МЕДИА-ЗАПРОСЫ (ОБЪЕДИНЕННЫЕ И ОПТИМИЗИРОВАННЫЕ)
   =================================== */

/* Десктоп от 1200px */
@media (min-width: 1200px) {
    .stats-grid-header {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 1fr);
        gap: 15px;
    }
    
    .stat-card-header.pr-card { grid-column: 1; grid-row: 1; }
    .stat-card-header.kd-card { grid-column: 1; grid-row: 2; }
    .stat-card-header.time-card { grid-column: 1; grid-row: 3; }
    .stat-card-header.wins-card { grid-column: 2; grid-row: 1; }
    .stat-card-header.winrate-card { grid-column: 2; grid-row: 2; }
    .stat-card-header.matches-card { grid-column: 2; grid-row: 3; }
}

/* Планшет 769px - 1199px */
@media (max-width: 1199px) and (min-width: 769px) {
    .stats-grid-header {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Десктоп и планшет общие стили */
@media (min-width: 768px) {
    .player-profile, 
    .player-pr-block {
        margin-bottom: 0;
    }
    
    .battle-pass-compact {
        margin-bottom: 0;
    }
}

/* Мобильные устройства до 768px */
@media (max-width: 768px) {
    /* Форма */
    .fortnite-stats-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .fortnite-stats-submit {
        width: 100%;
    }
    
    /* Enhanced Header */
    .player-header-new {
        padding: 20px;
    }
    
    .player-main-info {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .player-avatar-new {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .player-name-new {
        font-size: 24px;
    }
    
    .battle-pass-right {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 15px;
        width: 100%;
        min-width: auto;
    }
    
    /* Сетки */
    .stats-grid-header {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card-header {
        padding: 15px;
    }
    
    .stat-value-header {
        font-size: 22px;
    }
    
    /* PR карточка */
    .pr-progress-circle {
        width: var(--avatar-tiny);
        height: var(--avatar-tiny);
        margin-left: 5px;
    }
    
    .percentage {
        font-size: 0.35em;
    }
    
    /* Recent players */
    .fortnite-stats-recent-grid {
        grid-template-columns: 1fr;
    }
    
    .fortnite-stats-recent-card {
        padding: 10px;
    }
    
    .fortnite-stats-recent-check {
        font-size: var(--font-size-small);
        padding: 6px 10px;
    }
    
    /* PR система на мобильных */
    .player-pr-block {
        margin-bottom: 15px;
        width: 100%;
        justify-content: space-between;
    }
    
    .pr-value {
        font-size: 20px;
    }
    
    .pr-chart {
        width: 30px;
        height: 30px;
    }
    
    .battle-pass-title {
        font-size: var(--font-size-base);
    }
    
    .bp-label, .bp-value {
        font-size: 13px;
    }
}

/* Дополнительные медиа-запросы для PR системы */
@media (max-width: 600px) {
    #pr-tab .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pr-score {
        font-size: 32px;
    }
    
    .pr-ranks-table th, 
    .pr-ranks-table td {
        padding: 6px 8px;
        font-size: var(--font-size-base);
    }
    
    .pr-overview .pr-explanation {
        font-size: 13px;
    }
}