/* Character Selection Styles */
.character-selection {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    min-width: 400px;
}

/* Inline Character Selection (within auth navbar) */
.character-selection-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.character-selection-inline .character-dropdown-container {
    margin-bottom: 0;
}



.character-dropdown-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    min-width: 200px;
    z-index: 10000;
}

.dropdown-selected {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 20px;
}

.dropdown-selected:hover {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.dropdown-arrow {
    color: #333;
    transition: transform 0.3s ease;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    margin-top: 5px;
    /* Height is now set dynamically via JavaScript */
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
}

.dropdown-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.dropdown-option.selected {
    background-color: rgba(102, 126, 234, 0.2);
    font-weight: 500;
}

/* Class icon styling in dropdown */
.dropdown-option svg {
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
    flex-shrink: 0;
}

/* Create Character Button */
.create-character-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(76, 175, 80, 1);
    padding: 0;
    flex-shrink: 0;
}

.create-character-btn:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.8);
    color: rgba(76, 175, 80, 1);
    transform: scale(1.1);
}

.create-character-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

.create-character-btn:disabled:hover {
    transform: none;
}

/* Delete Character Button */
.delete-character-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 107, 107, 1);
    padding: 0;
    flex-shrink: 0;
}

.delete-character-btn:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.8);
    color: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

.delete-character-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

.delete-character-btn:disabled:hover {
    transform: none;
}



/* Character Modal Styles */
.character-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.character-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.character-modal h2 {
    color: white;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.character-modal .form-group {
    margin-bottom: 20px;
}

.character-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.character-modal .form-group input,
.character-modal .form-group select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

.character-modal .form-group input:focus,
.character-modal .form-group select:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.character-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.character-modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.character-modal-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.character-modal-btn.primary:hover {
    background: white;
    transform: translateY(-2px);
}

.character-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.character-modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.character-modal-btn.danger {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.character-modal-btn.danger:hover {
    background: rgba(255, 107, 107, 1);
    transform: translateY(-2px);
}

.character-modal .close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: opacity 0.3s ease;
}

.character-modal .close:hover {
    opacity: 0.7;
}



/* Responsive Design */
@media (max-width: 768px) {
    .character-dropdown-container {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .custom-dropdown {
        min-width: 250px;
    }
    
    .create-character-btn,
    .delete-character-btn {
        width: 28px;
        height: 28px;
    }
    
    .create-character-btn svg,
    .delete-character-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .character-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .character-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .character-modal-buttons {
        flex-direction: column;
    }
}
