/* Základní proměnné - Enhanced */
:root {
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gold: #ffd700;
  --silver: #a1c9f1;
  --bronze: #e08223;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-hover: rgba(255, 255, 255, 0.1);
  --text-muted: rgba(255, 255, 255, 0.6);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ======================
   Hero Section
   ====================== */
.hero-section {
  position: relative;
  margin-top: -8px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none; /* Aby neblokoval klikání */
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative; /* Aby měl obsah nad ostatními */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 40%, transparent 100%);
  padding: 1.5rem;
  color: #fff;
  max-width: 45%;
  text-align: left;
  border-radius: var(--border-radius);
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Stats Counter */
.stat-card {
    display: flex;
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
    height: 92%;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    border: var(--border-width) var(--border-style) var(--border-color);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background: var(--card-hover);
}

.stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.3rem;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.02);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.2rem;
    background: var(--color-text-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Color variants for stat icons */
.bg-primary-light { background: rgba(74, 107, 255, 0.15); }
.bg-danger-light { background: rgba(220, 53, 69, 0.15); }
.bg-warning-light { background: rgba(255, 193, 7, 0.15); }
.bg-info-light { background: rgba(23, 162, 184, 0.15); }
.bg-secondary-light { background: rgba(108, 117, 125, 0.15); }
.bg-success-light { background: rgba(40, 167, 69, 0.15); }

/* ======================
   Top Players Section - New Design
   ====================== */
/* TOP 3 hráči – obal */
.top3-players-new {
    margin-bottom: 1.5rem;
}

/* Karta hráče */
.top-player-card-new {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem;
    height: 62px;
    border-left: 3px solid var(--color-accent); /* tvůj primární border vlevo */
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

/* Druhý border (vnější nebo celý obrys) */
.top-player-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius); /* musí odpovídat hlavnímu */
    pointer-events: none; /* aby se pseudo-element nechytal při klikání */
    z-index: 0; /* nižší než obsah */
}

/* Trofej vlevo */
.trophy-container {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
    transition: var(--transition);
}

/* Info o hráči (avatar + jméno) */
.player-info-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

/* Avatar */
.player-avatar-new {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-img-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Jméno hráče */
.stat-name-container {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 1.5rem;
    white-space: nowrap;
}

/* Statistika zabití */
.stat-kills-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.stat-kills-new {
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    background: rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.stat-kills-new i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

/* Barvy pro pozice */
.border-gold {
    border-color: var(--gold) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.border-silver {
    border-color: var(--silver) !important;
}

.text-silver {
    color: var(--silver) !important;
}

.border-bronze {
    border-color: var(--bronze) !important;
}

.text-bronze {
    color: var(--bronze) !important;
}

/* Zvýraznění v žebříčku */
.top1-highlight {
    border-left: 3px solid var(--gold) !important;
}

.top2-highlight {
    border-left: 3px solid var(--silver) !important;
}

.top3-highlight {
    border-left: 3px solid var(--bronze) !important;
}

/* Leaderboard styles */
.leaderboard-card {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: var(--border-width) var(--border-style) var(--border-color);
}

.leaderboard-header {
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--card-border);
}

.leaderboard-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.leaderboard-body {
    padding: 0;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    transition: var(--transition);
    margin: 0.5rem;
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--color-accent);
    cursor: pointer;
}

.leaderboard-row:not(:last-child) {
    margin-bottom: 0.5rem;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Highlight classes for top 3 positions */
.leaderboard-row.top1-highlight {
    border-left: 3px solid var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

.leaderboard-row.top2-highlight {
    border-left: 3px solid var(--silver);
    background: rgba(192, 192, 192, 0.1);
}

.leaderboard-row.top3-highlight {
    border-left: 3px solid var(--bronze);
    background: rgba(205, 127, 50, 0.1);
}

.leaderboard-rank {
    width: 36px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
}

.leaderboard-player {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.player-avatar-sm {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.85rem;
    border: 2px solid var(--color-accent);
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.player-rank {
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.rank-icon {
    height: 24px;
    margin-right: 0.4rem;
}

.leaderboard-points, .leaderboard-playtime {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
    font-size: 1rem;
}

.empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* ======================
   News Section
   ====================== */
.news-section {
    padding: 0.1rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 3px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.news-card {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    height: 100%;
    transition: var(--transition);
    border: var(--border-width) var(--border-style) var(--border-color);
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    background: var(--card-hover);
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.news-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.news-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.news-link:hover {
    color: var(--primary-dark);
}

.news-link i {
    margin-left: 0.5rem;
    transition: var(--transition);
    font-size: 0.8rem;
}

.news-link:hover i {
    transform: translateX(3px);
}

/* ======================
   Features Section
   ====================== */
.features-section {
    padding: 0.1rem 0;
}

.feature-card {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition);
    border: var(--border-width) var(--border-style) var(--border-color);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    background: var(--card-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ======================
   Responsive Design
   ====================== */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .avatar-img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 991.98px) {
    .hero-slider {
        height: 400px;
    }
    
    .hero-content {
        max-width: 60%; /* Increased from 45% for tablets */
        padding: 1.5rem;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .welcome-card {
        padding: 1.75rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-slider {
        height: 200px;
    }
    
    .hero-content {
        max-width: 80%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        background: rgba(0, 0, 0, 0.7);
        width: 90%;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .rank-name-text {
        display: none;
    }

    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title {
        margin-bottom: 0.75rem;
    }
        
    .welcome-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .welcome-buttons {
        justify-content: center;
    }
    
    .welcome-image {
        margin-top: 1.5rem;
    }

    .top3-players-new .row {
        flex-direction: column;
        gap: 0.5rem; /* Mezera mezi kartami */
    }
    
    .top3-players-new .col-md-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .top-player-card-new {
        padding: 0.5rem 1rem;
        height: 60px;
        display: flex;
        align-items: center;
    }
    
    .trophy-container {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
        margin-right: 0.8rem;
        flex-shrink: 0;
    }
    
    .player-avatar-new {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .stat-name-container {
        font-size: 0.95rem;
        padding: 0.2rem 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .stat-kills-new {
        font-size: 0.9rem;
        margin-left: auto; /* Posune zabití doprava */
        padding: 0.2rem 0.6rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 12px;
    }
    
    .player-info-container {
        flex-grow: 1;
        min-width: 0; /* Umožní zkrácení textu */
    } 
}

@media (max-width: 575.98px) {
    .hero-slider {
        height: 200px;
    }
    
    .hero-content {
        max-width: 90%;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .leaderboard-rank {
        width: 30px;
        font-size: 0.9rem;
    }
    
    .player-avatar-sm {
        width: 42px;
        height: 42px;
        margin-right: 0.75rem;
    }
    
    .leaderboard-points, .leaderboard-playtime {
        min-width: 60px;
        font-size: 0.85rem;
    }
}