/**
 * Character Registration & List Styling
 * Dark theme, glassmorphism design
 */

/* ====================================
   Karakter Lista
   ==================================== */

.character-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.character-card {
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.character-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.3);
}

/* Faction colors */
.faction-alliance {
    border-left: 4px solid #0078ff;
}

.faction-horde {
    border-left: 4px solid #b30000;
}

.char-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.char-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.char-info {
    flex: 1;
}

.char-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.char-realm {
    font-size: 1rem;
    font-weight: 400;
    color: #94a3b8;
}

.main-badge {
    display: inline-block;
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.char-details {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
}

.char-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-pve {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.type-pvp {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.type-classic {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.ilvl-badge, .level-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.char-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.char-stat {
    color: #94a3b8;
    font-size: 0.9rem;
}

.char-stat strong {
    color: #e2e8f0;
    font-weight: 700;
}

.char-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.char-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.char-set-main {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.char-set-main:hover {
    background: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.char-refresh {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.char-refresh:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.char-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.char-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* ====================================
   Karakter Regisztráció
   ==================================== */

.char-reg-container {
    min-height: 300px;
}

.char-type-selector {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 2rem;
}

.char-type-btn {
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.char-type-btn:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 10px 40px rgba(96, 165, 250, 0.3);
}

.char-type-icon {
    font-size: 4rem;
}

.char-type-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
}

.char-type-desc {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

/* ====================================
   Karakter Preview
   ==================================== */

.char-preview-container {
    padding: 1rem;
}

.preview-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-avatar {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.preview-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 0.5rem 0;
}

.preview-details {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
}

.preview-badges {
    display: flex;
    gap: 0.5rem;
}

.preview-stats {
    margin-top: 1rem;
}

.preview-stats h4 {
    font-size: 1.1rem;
    color: #60a5fa;
    margin-bottom: 1rem;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #94a3b8;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-stat:last-child {
    border-bottom: none;
}

.preview-stat strong {
    color: #e2e8f0;
    font-weight: 700;
}

/* ====================================
   Modal Form Group (if not already in modal-system.css)
   ==================================== */

.modal-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.modal-form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.modal-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 20, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-form-input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.modal-form-input::placeholder {
    color: #64748b;
}

/* ====================================
   Responsive
   ==================================== */

/* Clickable character header */
.char-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.char-clickable:hover {
    opacity: 0.9;
}

/* ====================================
   Karakter Részletek Modal
   ==================================== */

.character-detail-container {
    color: var(--text-primary);
}

.char-detail-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid rgba(96, 165, 250, 0.5);
}

.char-detail-header.faction-alliance {
    border-left: 4px solid #0078ff;
}

.char-detail-header.faction-horde {
    border-left: 4px solid #b30000;
}

.char-detail-portrait {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.char-detail-info {
    flex: 1;
}

.char-detail-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.char-detail-realm {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.char-detail-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.char-detail-subtitle span {
    margin-right: 0.5rem;
}

.char-detail-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.char-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.char-detail-section {
    background: rgba(15, 20, 35, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.char-detail-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(96, 165, 250, 0.2);
}

/* Gear Grid */
.char-gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.char-gear-item {
    background: rgba(20, 25, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.char-gear-item:hover {
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-2px);
}

.gear-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gear-item-slot {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.gear-item-ilvl {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.gear-item-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.gear-item-name:hover {
    opacity: 0.8;
}

.gear-item-enchant {
    font-size: 0.85rem;
    color: #22c55e;
    margin-top: 0.25rem;
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.gear-item-enchant:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.gear-item-gems {
    font-size: 0.85rem;
    color: #a78bfa;
    margin-top: 0.25rem;
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.gear-item-gems:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Item Quality Colors */
.quality-poor { color: #9d9d9d; border-color: #9d9d9d40; }
.quality-common { color: #ffffff; border-color: #ffffff40; }
.quality-uncommon { color: #1eff00; border-color: #1eff0040; }
.quality-rare { color: #0070dd; border-color: #0070dd40; }
.quality-epic { color: #a335ee; border-color: #a335ee40; }
.quality-legendary { color: #ff8000; border-color: #ff800040; }
.quality-artifact { color: #e6cc80; border-color: #e6cc8040; }
.quality-heirloom { color: #00ccff; border-color: #00ccff40; }

.quality-POOR { color: #9d9d9d; border-color: #9d9d9d40; }
.quality-COMMON { color: #ffffff; border-color: #ffffff40; }
.quality-UNCOMMON { color: #1eff00; border-color: #1eff0040; }
.quality-RARE { color: #0070dd; border-color: #0070dd40; }
.quality-EPIC { color: #a335ee; border-color: #a335ee40; }
.quality-LEGENDARY { color: #ff8000; border-color: #ff800040; }
.quality-ARTIFACT { color: #e6cc80; border-color: #e6cc8040; }
.quality-HEIRLOOM { color: #00ccff; border-color: #00ccff40; }

/* Stats */
.char-stats-group {
    margin-bottom: 1.5rem;
}

.char-stats-group:last-child {
    margin-bottom: 0;
}

.char-stats-group h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin: 0 0 1rem 0;
}

.char-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: rgba(20, 25, 40, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.stat-value {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Raid Progression */
.raid-progression {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.raid-item {
    background: rgba(20, 25, 40, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.raid-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.raid-kills {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-mythic {
    color: #ff8000;
    font-weight: 600;
    font-size: 0.95rem;
}

.difficulty-heroic {
    color: #a335ee;
    font-weight: 600;
    font-size: 0.95rem;
}

.difficulty-normal {
    color: #0070dd;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Guild */
.guild-info {
    background: rgba(20, 25, 40, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

/* PvP Stats */
.pvp-bracket-stats {
    background: rgba(20, 25, 40, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.75rem;
}

.bracket-name {
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.bracket-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.bracket-details strong {
    color: var(--text-primary);
}

.honor-level {
    background: rgba(20, 25, 40, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
}

/* Metadata */
.char-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metadata-item {
    background: rgba(20, 25, 40, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metadata-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 0.75rem;
}

.profile-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.profile-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* ==========================================
   CLASSIC-SPECIFIC STYLES
   ========================================== */

/* Item Sets */
.item-set {
    background: rgba(20, 25, 40, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-secondary);
    margin-bottom: 1rem;
}

.set-name {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.set-display {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Resistance Stats */
.char-stats-grid .stat-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.char-stats-grid .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .char-type-selector {
        flex-direction: column;
        gap: 1rem;
    }

    .char-type-btn {
        min-width: 100%;
        padding: 1.5rem 2rem;
    }

    .char-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .char-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .char-actions {
        flex-direction: column;
    }

    .char-action-btn {
        width: 100%;
    }

    .preview-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .char-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .char-gear-grid {
        grid-template-columns: 1fr;
    }

    .char-stats-grid {
        grid-template-columns: 1fr;
    }
}
