/* Character Card Styles for Haikyu Fly High Tier List */

.character-card {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.2s ease;
}

.character-card:hover img {
    filter: brightness(1.1);
}

.character-card span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 10px 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
}

.character-rarity {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.character-role {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #87ceeb;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Character Modal Styles */
#characterModal {
    z-index: 10000;
}

#characterModal .modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #444;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#characterModal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

#characterModal .close:hover {
    color: #ff6b6b;
}

.character-modal-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.character-modal-header img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #444;
}

.character-info h2 {
    color: #ff6b6b;
    margin: 0 0 15px 0;
    font-size: 1.8rem;
}

.character-info p {
    margin: 8px 0;
    font-size: 1rem;
}

.character-info strong {
    color: #87ceeb;
}

.character-stats,
.character-skills,
.character-archetypes,
.character-bonds {
    margin-bottom: 25px;
}

.character-stats h3,
.character-skills h3,
.character-archetypes h3,
.character-bonds h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #444;
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.stat-label {
    color: #87ceeb;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #87ceeb;
}

.skill-item strong {
    color: #ffd700;
}

.archetype-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.archetype-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bond-effect {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #98fb98;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    #characterModal .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }

    .character-modal-header {
        flex-direction: column;
        text-align: center;
    }

    .character-modal-header img {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .archetype-tags {
        justify-content: center;
    }
}

/* Tier-specific character styling */
.Character-S {
    border: 3px solid #ff6b6b;
    border-radius: 10px;
    overflow: hidden;
}

.Character-A {
    border: 3px solid #ffa500;
    border-radius: 10px;
    overflow: hidden;
}

.Character-B {
    border: 3px solid #ffd700;
    border-radius: 10px;
    overflow: hidden;
}

.Character-C {
    border: 3px solid #7fff7f;
    border-radius: 10px;
    overflow: hidden;
}

.Character-D {
    border: 3px solid #7f7fff;
    border-radius: 10px;
    overflow: hidden;
}

.Character-E {
    border: 3px solid #ff7fff;
    border-radius: 10px;
    overflow: hidden;
}

.Character-F {
    border: 3px solid #cccccc;
    border-radius: 10px;
    overflow: hidden;
}

/* Loading animation for images */
.character-card img {
    transition: opacity 0.3s ease;
}

.character-card img[src*="haikyu-flyhigh-thumb.jpg"] {
    opacity: 0.7;
}

/* Hover effects for different tiers */
.Character-S:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.Character-A:hover {
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.Character-B:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.Character-C:hover {
    box-shadow: 0 8px 25px rgba(127, 255, 127, 0.4);
}

.Character-D:hover {
    box-shadow: 0 8px 25px rgba(127, 127, 255, 0.4);
}

.Character-E:hover {
    box-shadow: 0 8px 25px rgba(255, 127, 255, 0.4);
}

.Character-F:hover {
    box-shadow: 0 8px 25px rgba(204, 204, 204, 0.4);
}
