/* ===============================================
   Characters Page Styles
   =============================================== */

.characters-container {
    padding-top: 80px;
    min-height: 100vh;
    background: #0a0a14;
}

.characters-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px 30px;
}

.characters-header h1 {
    font-size: 42px;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: marbleShift 8s ease infinite;
    margin-bottom: 30px;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 18px;
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid rgba(224, 179, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.3);
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#factionFilter {
    padding: 10px 16px;
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid rgba(224, 179, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#factionFilter:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
}

/* Characters Content */
.characters-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 60px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 0;
}

/* Character Card */
.character-card {
    background: linear-gradient(135deg, #181828 60%, #22223a 100%);
    border: 2px solid rgba(224, 179, 255, 0.2);
    border-radius: 16px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(224, 179, 255, 0.1), rgba(179, 224, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(224, 179, 255, 0.4);
    border-width: 3px;
}

.character-card:hover::before {
    opacity: 1;
}

.character-card-content {
    position: relative;
    z-index: 1;
}

/* Character Portrait */
.character-portrait-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.character-portrait {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(224, 179, 255, 0.3);
    box-shadow: 0 4px 20px rgba(224, 179, 255, 0.4);
    transition: all 0.3s ease;
}

.character-portrait-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: #0a0a14;
    border: 3px solid rgba(224, 179, 255, 0.3);
    box-shadow: 0 4px 20px rgba(224, 179, 255, 0.4);
    transition: all 0.3s ease;
}

.character-card:hover .character-portrait,
.character-card:hover .character-portrait-fallback {
    border-width: 4px;
    box-shadow: 0 6px 28px rgba(224, 179, 255, 0.6);
    transform: scale(1.05);
}

.character-name-large {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.3;
}

.character-code-large {
    font-size: 13px;
    color: #b3e0ff;
    text-align: center;
    margin-bottom: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.character-faction {
    font-size: 14px;
    color: rgba(255, 179, 217, 0.9);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(224, 179, 255, 0.1);
    border-radius: 12px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.character-owner {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-style: italic;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(30, 30, 45, 0.95);
    border: 1px solid rgba(224, 179, 255, 0.3);
    border-radius: 8px;
    padding: 16px 24px;
    color: #ffffff;
    font-size: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 2000;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

.notification.success {
    border-color: #51cf66;
    background: rgba(81, 207, 102, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .characters-header h1 {
        font-size: 32px;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }

    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .character-portrait-container {
        width: 100px;
        height: 100px;
    }

    .character-name-large {
        font-size: 20px;
    }
}
