/* Dashboard specific styles */

.section-title,
.stat-card,
.stat-value,
.stat-label,
.character-stat-item,
.character-name,
.character-count,
.country-card,
.country-name,
.country-total,
.country-character-item,
.character-country-item,
.nav-link,
.filter-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dashboard-nav {
    margin-bottom: 30px;
    text-align: center;
}

.nav-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(139, 195, 74, 0.9);
    text-decoration: none;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0 5px;
}

.nav-link:focus,
.nav-link:active {
    outline: none;
}

.nav-link:hover {
    background: rgba(139, 195, 74, 0.2);
    border-color: #8bc34a;
    transform: translateY(-2px);
}

/* Loading screen */
.loading-card {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(139, 195, 74, 0.1);
    border: 2px solid rgba(139, 195, 74, 0.3);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(139, 195, 74, 0.2);
    border-top-color: #8bc34a;
    border-right-color: #ff9800;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(139, 195, 74, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Error screen */
.error-card {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(255, 82, 82, 0.1);
    border: 2px solid rgba(255, 82, 82, 0.5);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255, 82, 82, 0.6));
}

.error-card h2 {
    font-family: 'Bebas Neue', sans-serif;
    color: #ff5252;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
}

.error-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

/* Stats sections */
.stats-section {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(139, 195, 74, 0.1);
    border: 2px solid rgba(139, 195, 74, 0.3);
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #8bc34a;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(139, 195, 74, 0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8bc34a, #ff9800, #8bc34a, transparent);
    box-shadow: 0 0 10px rgba(139, 195, 74, 0.6);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.stat-card {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(5px);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(139, 195, 74, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 195, 74, 0.5);
    border-color: #8bc34a;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(139, 195, 74, 0.5));
}

.stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: #8bc34a;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(139, 195, 74, 0.4);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Character stats */
.character-stats-container {
    display: grid;
    gap: 15px;
}

.character-stat-item {
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.character-stat-item:hover {
    border-color: #8bc34a;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.5);
}

.character-avatar-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid;
    flex-shrink: 0;
}

.character-avatar-small.protagonist {
    background: linear-gradient(135deg, #1e3a1e, #2d5a2d, #4caf50);
    border-color: #8bc34a;
    box-shadow: 0 0 15px rgba(139, 195, 74, 0.6);
}

.character-avatar-small.antagonist {
    background: linear-gradient(135deg, #3a1e1e, #5a2d2d, #af4c4c);
    border-color: #ff5252;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.6);
}

.character-avatar-small.neutral {
    background: linear-gradient(135deg, #3a3a1e, #5a5a2d, #afaf4c);
    border-color: #ff9800;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
}

.character-avatar-small.lawful {
    background: linear-gradient(135deg, #1e2a3a, #2d3f5a, #4c6faf);
    border-color: #2196f3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.6);
}

.character-info {
    flex: 1;
}

.character-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #8bc34a;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(139, 195, 74, 0.3);
}

.character-stats-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-horizontal {
    flex: 1;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
}

.progress-fill-horizontal {
    height: 100%;
    background: linear-gradient(90deg, #8bc34a, #ff9800, #4caf50);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.8s ease;
    animation: progressShimmer 2s linear infinite;
    box-shadow: 0 0 10px rgba(139, 195, 74, 0.5);
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes progressShimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
    pointer-events: none;
}

.character-count {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    min-width: 80px;
    text-align: right;
}

/* Filter container */
.filter-container {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-container label {
    font-weight: 600;
    color: #8bc34a;
    text-shadow: 0 0 5px rgba(139, 195, 74, 0.3);
}

.country-select,
.character-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-select:focus,
.character-select:focus {
    outline: none;
    border-color: #8bc34a;
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.2), 0 0 15px rgba(139, 195, 74, 0.3);
}

/* Country stats */
.country-stats-container {
    display: grid;
    gap: 20px;
}

.country-card {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(5px);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    box-shadow: inset 0 0 20px rgba(139, 195, 74, 0.05);
}

.country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(139, 195, 74, 0.4);
}

.country-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #8bc34a;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(139, 195, 74, 0.3);
}

.country-total {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.country-characters {
    display: grid;
    gap: 10px;
}

.country-character-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(20, 20, 20, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(139, 195, 74, 0.2);
}

.country-character-name {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.country-character-count {
    color: rgba(139, 195, 74, 0.9);
    font-weight: 600;
}

/* Character country stats */
.character-country-container {
    display: grid;
    gap: 12px;
}

.character-country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
}

.character-country-item:hover {
    border-color: #8bc34a;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
}

.character-country-name {
    flex: 1;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.character-country-count {
    font-weight: 600;
    color: rgba(139, 195, 74, 0.9);
    margin-left: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(139, 195, 74, 0.3));
}

.empty-state p {
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .character-stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .character-info {
        width: 100%;
    }
    
    .character-stats-bar {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar-horizontal {
        flex: none;
        width: 100%;
        height: 30px;
    }
    
    .character-count {
        text-align: center;
        width: 100%;
        min-width: auto;
        font-size: 1rem;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .country-select,
    .character-select {
        width: 100%;
    }
    
    .country-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}
